jodit-pro 4.12.26 → 4.12.32

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 (346) hide show
  1. package/es2015/jodit.css +1 -1
  2. package/es2015/jodit.fat.min.css +1 -1
  3. package/es2015/jodit.fat.min.js +16 -14
  4. package/es2015/jodit.js +419 -122
  5. package/es2015/jodit.min.js +11 -11
  6. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  7. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  8. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  9. package/es2015/plugins/autocomplete/autocomplete.css +62 -0
  10. package/es2015/plugins/autocomplete/autocomplete.js +29 -2
  11. package/es2015/plugins/autocomplete/autocomplete.min.css +1 -0
  12. package/es2015/plugins/autocomplete/autocomplete.min.js +2 -2
  13. package/es2015/plugins/backup/backup.css +1 -1
  14. package/es2015/plugins/backup/backup.js +1 -1
  15. package/es2015/plugins/backup/backup.min.js +1 -1
  16. package/es2015/plugins/button-generator/button-generator.css +1 -1
  17. package/es2015/plugins/button-generator/button-generator.js +1 -1
  18. package/es2015/plugins/button-generator/button-generator.min.js +1 -1
  19. package/es2015/plugins/change-case/change-case.js +1 -1
  20. package/es2015/plugins/change-case/change-case.min.js +1 -1
  21. package/es2015/plugins/color-picker/color-picker.css +1 -1
  22. package/es2015/plugins/color-picker/color-picker.js +1 -1
  23. package/es2015/plugins/color-picker/color-picker.min.js +1 -1
  24. package/es2015/plugins/emoji/emoji.css +1 -1
  25. package/es2015/plugins/emoji/emoji.js +1 -1
  26. package/es2015/plugins/emoji/emoji.min.js +1 -1
  27. package/es2015/plugins/export-docs/export-docs.js +1 -1
  28. package/es2015/plugins/export-docs/export-docs.min.js +1 -1
  29. package/es2015/plugins/finder/finder.css +1 -1
  30. package/es2015/plugins/finder/finder.js +1 -1
  31. package/es2015/plugins/finder/finder.min.js +1 -1
  32. package/es2015/plugins/google-maps/google-maps.css +1 -1
  33. package/es2015/plugins/google-maps/google-maps.js +1 -1
  34. package/es2015/plugins/google-maps/google-maps.min.js +1 -1
  35. package/es2015/plugins/google-search/google-search.js +1 -1
  36. package/es2015/plugins/google-search/google-search.min.js +1 -1
  37. package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
  38. package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
  39. package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
  40. package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
  41. package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
  42. package/es2015/plugins/keyboard/keyboard.css +1 -1
  43. package/es2015/plugins/keyboard/keyboard.js +1 -1
  44. package/es2015/plugins/keyboard/keyboard.min.js +1 -1
  45. package/es2015/plugins/mobile-view/mobile-view.js +1 -1
  46. package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
  47. package/es2015/plugins/page-break/page-break.js +23 -2
  48. package/es2015/plugins/page-break/page-break.min.js +2 -2
  49. package/es2015/plugins/paste-code/paste-code.css +28 -1
  50. package/es2015/plugins/paste-code/paste-code.js +489 -64
  51. package/es2015/plugins/paste-code/paste-code.min.css +1 -1
  52. package/es2015/plugins/paste-code/paste-code.min.js +4 -2
  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 +9 -1
  65. package/es2015/plugins/todo-list/todo-list.min.js +2 -2
  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.css +1 -1
  73. package/es2018/jodit.fat.min.js +16 -14
  74. package/es2018/jodit.min.js +11 -11
  75. package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  76. package/es2018/plugins/autocomplete/autocomplete.min.css +1 -0
  77. package/es2018/plugins/autocomplete/autocomplete.min.js +2 -2
  78. package/es2018/plugins/backup/backup.min.js +1 -1
  79. package/es2018/plugins/button-generator/button-generator.min.js +1 -1
  80. package/es2018/plugins/change-case/change-case.min.js +1 -1
  81. package/es2018/plugins/color-picker/color-picker.min.js +1 -1
  82. package/es2018/plugins/emoji/emoji.min.js +1 -1
  83. package/es2018/plugins/export-docs/export-docs.min.js +1 -1
  84. package/es2018/plugins/finder/finder.min.js +1 -1
  85. package/es2018/plugins/google-maps/google-maps.min.js +1 -1
  86. package/es2018/plugins/google-search/google-search.min.js +1 -1
  87. package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
  88. package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
  89. package/es2018/plugins/keyboard/keyboard.min.js +1 -1
  90. package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
  91. package/es2018/plugins/page-break/page-break.min.js +2 -2
  92. package/es2018/plugins/paste-code/paste-code.min.css +1 -1
  93. package/es2018/plugins/paste-code/paste-code.min.js +4 -2
  94. package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
  95. package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
  96. package/es2018/plugins/style/style.min.js +1 -1
  97. package/es2018/plugins/templates/templates.min.js +1 -1
  98. package/es2018/plugins/todo-list/todo-list.min.js +2 -2
  99. package/es2018/plugins/translate/translate.min.js +1 -1
  100. package/es2018/plugins/tune-block/tune-block.min.js +1 -1
  101. package/es2021/jodit.css +1 -1
  102. package/es2021/jodit.fat.min.css +1 -1
  103. package/es2021/jodit.fat.min.js +19 -17
  104. package/es2021/jodit.js +418 -121
  105. package/es2021/jodit.min.js +14 -14
  106. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  107. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  108. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  109. package/es2021/plugins/autocomplete/autocomplete.css +62 -0
  110. package/es2021/plugins/autocomplete/autocomplete.js +29 -2
  111. package/es2021/plugins/autocomplete/autocomplete.min.css +1 -0
  112. package/es2021/plugins/autocomplete/autocomplete.min.js +2 -2
  113. package/es2021/plugins/backup/backup.css +1 -1
  114. package/es2021/plugins/backup/backup.js +1 -1
  115. package/es2021/plugins/backup/backup.min.js +1 -1
  116. package/es2021/plugins/button-generator/button-generator.css +1 -1
  117. package/es2021/plugins/button-generator/button-generator.js +1 -1
  118. package/es2021/plugins/button-generator/button-generator.min.js +1 -1
  119. package/es2021/plugins/change-case/change-case.js +1 -1
  120. package/es2021/plugins/change-case/change-case.min.js +1 -1
  121. package/es2021/plugins/color-picker/color-picker.css +1 -1
  122. package/es2021/plugins/color-picker/color-picker.js +1 -1
  123. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  124. package/es2021/plugins/emoji/emoji.css +1 -1
  125. package/es2021/plugins/emoji/emoji.js +1 -1
  126. package/es2021/plugins/emoji/emoji.min.js +1 -1
  127. package/es2021/plugins/export-docs/export-docs.js +1 -1
  128. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  129. package/es2021/plugins/finder/finder.css +1 -1
  130. package/es2021/plugins/finder/finder.js +1 -1
  131. package/es2021/plugins/finder/finder.min.js +1 -1
  132. package/es2021/plugins/google-maps/google-maps.css +1 -1
  133. package/es2021/plugins/google-maps/google-maps.js +1 -1
  134. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  135. package/es2021/plugins/google-search/google-search.js +1 -1
  136. package/es2021/plugins/google-search/google-search.min.js +1 -1
  137. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  138. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  139. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  140. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  141. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  142. package/es2021/plugins/keyboard/keyboard.css +1 -1
  143. package/es2021/plugins/keyboard/keyboard.js +1 -1
  144. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  145. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  146. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  147. package/es2021/plugins/page-break/page-break.js +23 -2
  148. package/es2021/plugins/page-break/page-break.min.js +2 -2
  149. package/es2021/plugins/paste-code/paste-code.css +28 -1
  150. package/es2021/plugins/paste-code/paste-code.js +488 -64
  151. package/es2021/plugins/paste-code/paste-code.min.css +1 -1
  152. package/es2021/plugins/paste-code/paste-code.min.js +4 -2
  153. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  154. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  155. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  156. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  157. package/es2021/plugins/style/style.css +1 -1
  158. package/es2021/plugins/style/style.js +1 -1
  159. package/es2021/plugins/style/style.min.js +1 -1
  160. package/es2021/plugins/templates/templates.css +1 -1
  161. package/es2021/plugins/templates/templates.js +1 -1
  162. package/es2021/plugins/templates/templates.min.js +1 -1
  163. package/es2021/plugins/todo-list/todo-list.css +1 -1
  164. package/es2021/plugins/todo-list/todo-list.js +9 -1
  165. package/es2021/plugins/todo-list/todo-list.min.js +2 -2
  166. package/es2021/plugins/translate/translate.css +1 -1
  167. package/es2021/plugins/translate/translate.js +1 -1
  168. package/es2021/plugins/translate/translate.min.js +1 -1
  169. package/es2021/plugins/tune-block/tune-block.css +1 -1
  170. package/es2021/plugins/tune-block/tune-block.js +1 -1
  171. package/es2021/plugins/tune-block/tune-block.min.js +1 -1
  172. package/es2021.en/jodit.css +1 -1
  173. package/es2021.en/jodit.fat.min.css +1 -1
  174. package/es2021.en/jodit.fat.min.js +31 -29
  175. package/es2021.en/jodit.js +418 -121
  176. package/es2021.en/jodit.min.js +14 -14
  177. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  178. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  179. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  180. package/es2021.en/plugins/autocomplete/autocomplete.css +62 -0
  181. package/es2021.en/plugins/autocomplete/autocomplete.js +29 -2
  182. package/es2021.en/plugins/autocomplete/autocomplete.min.css +1 -0
  183. package/es2021.en/plugins/autocomplete/autocomplete.min.js +2 -2
  184. package/es2021.en/plugins/backup/backup.css +1 -1
  185. package/es2021.en/plugins/backup/backup.js +1 -1
  186. package/es2021.en/plugins/backup/backup.min.js +1 -1
  187. package/es2021.en/plugins/button-generator/button-generator.css +1 -1
  188. package/es2021.en/plugins/button-generator/button-generator.js +1 -1
  189. package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
  190. package/es2021.en/plugins/change-case/change-case.js +1 -1
  191. package/es2021.en/plugins/change-case/change-case.min.js +1 -1
  192. package/es2021.en/plugins/color-picker/color-picker.css +1 -1
  193. package/es2021.en/plugins/color-picker/color-picker.js +1 -1
  194. package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
  195. package/es2021.en/plugins/emoji/emoji.css +1 -1
  196. package/es2021.en/plugins/emoji/emoji.js +1 -1
  197. package/es2021.en/plugins/emoji/emoji.min.js +1 -1
  198. package/es2021.en/plugins/export-docs/export-docs.js +1 -1
  199. package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
  200. package/es2021.en/plugins/finder/finder.css +1 -1
  201. package/es2021.en/plugins/finder/finder.js +1 -1
  202. package/es2021.en/plugins/finder/finder.min.js +1 -1
  203. package/es2021.en/plugins/google-maps/google-maps.css +1 -1
  204. package/es2021.en/plugins/google-maps/google-maps.js +1 -1
  205. package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
  206. package/es2021.en/plugins/google-search/google-search.js +1 -1
  207. package/es2021.en/plugins/google-search/google-search.min.js +1 -1
  208. package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
  209. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
  210. package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
  211. package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
  212. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
  213. package/es2021.en/plugins/keyboard/keyboard.css +1 -1
  214. package/es2021.en/plugins/keyboard/keyboard.js +1 -1
  215. package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
  216. package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
  217. package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
  218. package/es2021.en/plugins/page-break/page-break.js +23 -2
  219. package/es2021.en/plugins/page-break/page-break.min.js +2 -2
  220. package/es2021.en/plugins/paste-code/paste-code.css +28 -1
  221. package/es2021.en/plugins/paste-code/paste-code.js +488 -64
  222. package/es2021.en/plugins/paste-code/paste-code.min.css +1 -1
  223. package/es2021.en/plugins/paste-code/paste-code.min.js +4 -2
  224. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
  225. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
  226. package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
  227. package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
  228. package/es2021.en/plugins/style/style.css +1 -1
  229. package/es2021.en/plugins/style/style.js +1 -1
  230. package/es2021.en/plugins/style/style.min.js +1 -1
  231. package/es2021.en/plugins/templates/templates.css +1 -1
  232. package/es2021.en/plugins/templates/templates.js +1 -1
  233. package/es2021.en/plugins/templates/templates.min.js +1 -1
  234. package/es2021.en/plugins/todo-list/todo-list.css +1 -1
  235. package/es2021.en/plugins/todo-list/todo-list.js +9 -1
  236. package/es2021.en/plugins/todo-list/todo-list.min.js +2 -2
  237. package/es2021.en/plugins/translate/translate.css +1 -1
  238. package/es2021.en/plugins/translate/translate.js +1 -1
  239. package/es2021.en/plugins/translate/translate.min.js +1 -1
  240. package/es2021.en/plugins/tune-block/tune-block.css +1 -1
  241. package/es2021.en/plugins/tune-block/tune-block.js +1 -1
  242. package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
  243. package/es5/jodit.css +2 -2
  244. package/es5/jodit.fat.min.css +1 -1
  245. package/es5/jodit.fat.min.js +2 -2
  246. package/es5/jodit.js +565 -157
  247. package/es5/jodit.min.css +2 -2
  248. package/es5/jodit.min.js +2 -2
  249. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  250. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  251. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  252. package/es5/plugins/autocomplete/autocomplete.css +62 -0
  253. package/es5/plugins/autocomplete/autocomplete.js +29 -2
  254. package/es5/plugins/autocomplete/autocomplete.min.css +1 -0
  255. package/es5/plugins/autocomplete/autocomplete.min.js +2 -2
  256. package/es5/plugins/backup/backup.css +1 -1
  257. package/es5/plugins/backup/backup.js +1 -1
  258. package/es5/plugins/backup/backup.min.js +1 -1
  259. package/es5/plugins/button-generator/button-generator.css +1 -1
  260. package/es5/plugins/button-generator/button-generator.js +1 -1
  261. package/es5/plugins/button-generator/button-generator.min.js +1 -1
  262. package/es5/plugins/change-case/change-case.js +1 -1
  263. package/es5/plugins/change-case/change-case.min.js +1 -1
  264. package/es5/plugins/color-picker/color-picker.css +1 -1
  265. package/es5/plugins/color-picker/color-picker.js +1 -1
  266. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  267. package/es5/plugins/emoji/emoji.css +1 -1
  268. package/es5/plugins/emoji/emoji.js +1 -1
  269. package/es5/plugins/emoji/emoji.min.js +1 -1
  270. package/es5/plugins/export-docs/export-docs.js +1 -1
  271. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  272. package/es5/plugins/finder/finder.css +1 -1
  273. package/es5/plugins/finder/finder.js +1 -1
  274. package/es5/plugins/finder/finder.min.js +1 -1
  275. package/es5/plugins/google-maps/google-maps.css +1 -1
  276. package/es5/plugins/google-maps/google-maps.js +1 -1
  277. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  278. package/es5/plugins/google-search/google-search.js +1 -1
  279. package/es5/plugins/google-search/google-search.min.js +1 -1
  280. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  281. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  282. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  283. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  284. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  285. package/es5/plugins/keyboard/keyboard.css +1 -1
  286. package/es5/plugins/keyboard/keyboard.js +1 -1
  287. package/es5/plugins/keyboard/keyboard.min.js +1 -1
  288. package/es5/plugins/mobile-view/mobile-view.js +1 -1
  289. package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
  290. package/es5/plugins/page-break/page-break.js +23 -2
  291. package/es5/plugins/page-break/page-break.min.js +2 -2
  292. package/es5/plugins/paste-code/paste-code.css +28 -1
  293. package/es5/plugins/paste-code/paste-code.js +586 -66
  294. package/es5/plugins/paste-code/paste-code.min.css +1 -1
  295. package/es5/plugins/paste-code/paste-code.min.js +2 -2
  296. package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
  297. package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
  298. package/es5/plugins/show-blocks/show-blocks.js +1 -1
  299. package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
  300. package/es5/plugins/style/style.css +1 -1
  301. package/es5/plugins/style/style.js +1 -1
  302. package/es5/plugins/style/style.min.js +1 -1
  303. package/es5/plugins/templates/templates.css +1 -1
  304. package/es5/plugins/templates/templates.js +1 -1
  305. package/es5/plugins/templates/templates.min.js +1 -1
  306. package/es5/plugins/todo-list/todo-list.css +1 -1
  307. package/es5/plugins/todo-list/todo-list.js +9 -1
  308. package/es5/plugins/todo-list/todo-list.min.js +2 -2
  309. package/es5/plugins/translate/translate.css +1 -1
  310. package/es5/plugins/translate/translate.js +1 -1
  311. package/es5/plugins/translate/translate.min.js +1 -1
  312. package/es5/plugins/tune-block/tune-block.css +1 -1
  313. package/es5/plugins/tune-block/tune-block.js +1 -1
  314. package/es5/plugins/tune-block/tune-block.min.js +1 -1
  315. package/es5/polyfills.fat.min.js +1 -1
  316. package/es5/polyfills.js +1 -1
  317. package/es5/polyfills.min.js +1 -1
  318. package/esm/config.d.ts +6 -1
  319. package/esm/plugins/all.d.ts +1 -1
  320. package/esm/plugins/all.js +1 -1
  321. package/esm/plugins/autocomplete/autocomplete.d.ts +2 -26
  322. package/esm/plugins/autocomplete/autocomplete.impl.d.ts +31 -0
  323. package/esm/plugins/autocomplete/autocomplete.impl.js +1 -0
  324. package/esm/plugins/autocomplete/autocomplete.js +1 -1
  325. package/esm/plugins/index.d.ts +1 -1
  326. package/esm/plugins/index.js +1 -1
  327. package/esm/plugins/page-break/page-break.js +1 -1
  328. package/esm/plugins/paste-code/config.d.ts +6 -1
  329. package/esm/plugins/paste-code/config.js +1 -1
  330. package/esm/plugins/paste-code/helpers.d.ts +25 -0
  331. package/esm/plugins/paste-code/helpers.js +1 -0
  332. package/esm/plugins/paste-code/paste-code.d.ts +9 -0
  333. package/esm/plugins/paste-code/paste-code.js +1 -1
  334. package/esm/plugins/paste-code/ui/code-tuner/code-tuner.d.ts +87 -0
  335. package/esm/plugins/paste-code/ui/code-tuner/code-tuner.js +3 -0
  336. package/esm/plugins/paste-code/ui/code-tuner/drag.svg.js +1 -0
  337. package/esm/plugins/todo-list/todo-list.js +1 -1
  338. package/package.json +1 -1
  339. package/types/config.d.ts +6 -1
  340. package/types/plugins/autocomplete/autocomplete.d.ts +2 -26
  341. package/types/plugins/autocomplete/autocomplete.impl.d.ts +31 -0
  342. package/types/plugins/index.d.ts +1 -1
  343. package/types/plugins/paste-code/config.d.ts +6 -1
  344. package/types/plugins/paste-code/helpers.d.ts +25 -0
  345. package/types/plugins/paste-code/paste-code.d.ts +9 -0
  346. package/types/plugins/paste-code/ui/code-tuner/code-tuner.d.ts +87 -0
@@ -1 +1 @@
1
- .jodit-paste-code{display:flex;flex-direction:column;height:100%;justify-content:stretch;padding:16px}.jodit-paste-code__textarea{flex:1;height:100%;justify-content:stretch}
1
+ .jodit-ui-code-tuner{left:0;position:fixed;top:0;z-index:10}.jodit-ui-code-tuner__anchor{background-color:#fff;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%235d6b7a' viewBox='0 0 16 16'%3E%3Ccircle cx='6' cy='3' r='1.5'/%3E%3Ccircle cx='10' cy='3' r='1.5'/%3E%3Ccircle cx='6' cy='8' r='1.5'/%3E%3Ccircle cx='10' cy='8' r='1.5'/%3E%3Ccircle cx='6' cy='13' r='1.5'/%3E%3Ccircle cx='10' cy='13' r='1.5'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:11px;border:1px solid rgba(0,0,0,.12);border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.15);cursor:grab;height:26px;opacity:.9;width:16px}.jodit-ui-code-tuner__anchor:hover{opacity:1}.jodit-ui-code-tuner__anchor:active{cursor:grabbing}.jodit-paste-code{display:flex;flex-direction:column;height:100%;justify-content:stretch;padding:16px}.jodit-paste-code__textarea{flex:1;height:100%;justify-content:stretch}
@@ -1,8 +1,8 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
8
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var a=t();for(var n in a)("object"==typeof exports?exports:e)[n]=a[n]}}(self,function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[150],{75689:function(e){e.exports='<svg viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> <path d="M2.5244141,23.5h18.9511719c0.4140625,0,0.75-0.3359375,0.75-0.75V4.9208984 c0-0.1992188-0.0795898-0.390625-0.2207031-0.53125L18.3198242,0.71875C18.1791992,0.5786133,17.9887695,0.5,17.7905273,0.5 H2.5244141c-0.4140625,0-0.75,0.3359375-0.75,0.75v21.5C1.7744141,23.1640625,2.1103516,23.5,2.5244141,23.5z M20.7128296,5.2197266 h-2.6986694V2.531189L20.7128296,5.2197266z M3.2744141,2h13.2397461v3.9697266c0,0.4140625,0.3359375,0.75,0.75,0.75h3.4614258V22 H3.2744141V2z" fill="#1D1D1D"/> <path d="M8.75,10.25h1.75c0.4140625,0,0.75-0.3359375,0.75-0.75s-0.3359375-0.75-0.75-0.75H8 c-0.4140625,0-0.75,0.3359375-0.75,0.75v2.75H6c-0.4140625,0-0.75,0.3359375-0.75,0.75S5.5859375,13.75,6,13.75h1.25v2.75 c0,0.4140625,0.3359375,0.75,0.75,0.75h2.5c0.4140625,0,0.75-0.3359375,0.75-0.75s-0.3359375-0.75-0.75-0.75H8.75V10.25z" fill="#1D1D1D"/> <path d="M18.5,12.25h-1.25V9.5c0-0.4140625-0.3359375-0.75-0.75-0.75H14c-0.4140625,0-0.75,0.3359375-0.75,0.75 s0.3359375,0.75,0.75,0.75h1.75v5.5H14c-0.4140625,0-0.75,0.3359375-0.75,0.75s0.3359375,0.75,0.75,0.75h2.5 c0.4140625,0,0.75-0.3359375,0.75-0.75v-2.75h1.25c0.4140625,0,0.75-0.3359375,0.75-0.75S18.9140625,12.25,18.5,12.25z" fill="#1D1D1D"/></svg>'},83967:function(e,t,a){"use strict";var n=a(75689),i=a.n(n),o=a(6441),r=a(53326);o.Config.prototype.controls.pasteCode={icon:i(),tooltip:"Paste code",command:"pasteCode"},o.Config.prototype.pasteCode={globalHighlightLib:!1,canonicalLanguageCode:function(e){switch(e){case"ts":return"typescript";case"js":return"javascript";case"markup":return"html"}return e},highlightLib:{beforeLibLoad:function(){window.Prism=window.Prism||{},window.Prism.manual=!0},highlight:function(e,t){return"u">typeof Prism?Prism.highlight(e,Prism.languages[t]||Prism.languages.plain,t):(0,r.htmlspecialchars)(e)},isLangLoaded:function(e){return"html"===e||"u">typeof Prism&&!!Prism.languages[e]},js:["https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js","https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"],langUrl:function(e){return"https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-".concat(e,".min.js")},css:["https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css"]},defaultLanguage:"html",insertTemplate:function(e,t,a){return'<pre class="language-'.concat(t,'">').concat((0,r.htmlspecialchars)(a),"</pre>")},languages:[{value:"plaintext",text:"Plain"},{value:"html",text:"HTML/XML"},{value:"bash",text:"Bash"},{value:"php",text:"PHP"},{value:"javascript",text:"JavaScript"},{value:"typescript",text:"TypeScript"},{value:"jsx",text:"JSX"},{value:"java",text:"Java"},{value:"css",text:"CSS"},{value:"php",text:"PHP"},{value:"ruby",text:"Ruby"},{value:"python",text:"Python"},{value:"java",text:"Java"},{value:"c",text:"C"},{value:"csharp",text:"C#"},{value:"cpp",text:"C++"},{value:"sql",text:"SQL"},{value:"docker",text:"Docker"},{value:"http",text:"HTTP"},{value:"ini",text:"INI"},{value:"yaml",text:"YAML"},{value:"json",text:"JSON"},{value:"json5",text:"JSON5"},{value:"makefile",text:"Makefile"},{value:"swift",text:"Swift"}],dialog:{width:700,height:600}}},41406:function(e,t,a){"use strict";a.r(t),a.d(t,{pasteCode:function(){return L}});var n=a(77688),i=a(80294),o=a(20616),r=a(67709),l=a(82749),s=a(18766),c=a(23078),u=a(31635),d=a(62361);a(83967);var h=a(82758),g=a(65478),p=a(21537),f=a(87612),m=a(53326),v=a(50911),_=a(67510),C=a(41409),b=a(2692),L=function(e){function t(){var e;return(0,o._)(this,t),e=(0,i._)(this,t,arguments),(0,l._)(e,"buttons",[{name:"pasteCode",group:"clipboard"}]),(0,l._)(e,"__highlightLibJSIsLoaded",!1),(0,l._)(e,"__loadLanguage",new Map),(0,l._)(e,"__initHighlightLibLoading",function(t){return(0,n._)(function(){var a,n,i,o,r,l,s,c,u,g;return(0,d._)(this,function(d){switch(d.label){case 0:if(n=(a=e.j.o.pasteCode).globalHighlightLib,o=(i=a.highlightLib).css,r=i.js,l=i.langUrl,s=i.highlight,c=i.isLangLoaded,u=i.beforeLibLoad,g=i.afterLibLoad,e.__highlightLibJSIsLoaded||n||(e.__highlightLibJSIsLoaded=Promise.resolve(null==u?void 0:u()).then(function(){return x(e.async,Promise.allSettled([(0,p.loadNextStyle)(e.jodit,o).catch(function(){return null}),(0,p.loadNext)(e.jodit,r).catch(function(){return null})]))}).then(function(){return null==g?void 0:g()})),(0,f.isBoolean)(e.__highlightLibJSIsLoaded))return[3,2];return[4,e.__highlightLibJSIsLoaded];case 1:d.sent(),d.label=2;case 2:if(!(t&&!c(t)&&!n))return[3,4];return e.__loadLanguage.has(t)||(h.IS_PROD,e.__loadLanguage.set(t,x(e.async,(0,p.appendScriptAsync)(e.jodit,l(t)).catch(function(){return null})))),[4,e.__loadLanguage.get(t)];case 3:d.sent(),d.label=4;case 4:return[2,{highlight:s}]}})})()}),e}return(0,s._)(t,e),(0,r._)(t,[{key:"className",value:function(){return"pasteCode"}},{key:"afterInit",value:function(e){var t=this;e.registerCommand("pasteCode",function(){return t.__openCodeEditDialog()}),e.async.requestIdleCallback(function(){return t.__initHighlightLibLoading()})}},{key:"__openCodeEditDialog",value:function(e,t,a){var n=this,i=this.j,o=this.__createForm(),r=(0,p.refs)(o.container),l=r.code,s=r.language;e&&(s.value=e),t&&(l.value=t),i.async.requestIdleCallback(function(){l.focus()}),i.s.save(),this.__createDialog(function(){if(o.validate()){i.s.restore();var e=i.createInside.fromHTML(i.o.pasteCode.insertTemplate(i,s.value,l.value));if(a)C.Dom.replace(a,e,i.createInside,!1,!0);else{var t=i.s.current(),r=C.Dom.up(t,C.Dom.isBlock,i.editor);r&&!C.Dom.isCell(r)?C.Dom.after(r,e):i.s.insertNode(e)}n.__imdOnChange();return}return!1},function(){i.s.restore()}).setContent(o.container).open(!0)}},{key:"beforeDestruct",value:function(e){}},{key:"__createForm",value:function(){var e=this.jodit;return new _.UIForm(e,[new _.UISelect(e,{name:"language",label:"Language",value:e.o.pasteCode.defaultLanguage,options:e.o.pasteCode.languages,required:!0}),new _.UITextArea(e,{label:"Code view",resizable:!1,name:"code",required:!0,className:"jodit-paste-code__textarea"})],{className:"jodit-paste-code"})}},{key:"__createDialog",value:function(e,t){var a=new C.Dialog({language:this.j.o.language});return a.setHeader("Insert/Edit Code Sample").setSize(this.j.o.pasteCode.dialog.width,this.j.o.pasteCode.dialog.height).setFooter([(0,_.Button)(a,"","Cancel","default").onAction(function(){a.close(),t()}),(0,_.Button)(a,"save","Save","primary").onAction(function(){a.close(),e()})]),a}},{key:"__onChange",value:function(){this.__imdOnChange()}},{key:"__imdOnChange",value:function(){var e=this;(0,p.$$)("pre",this.j.editor).forEach(function(t){(0,p.attr)(t,"contenteditable")||((0,p.attr)(t,"contenteditable",!1),e.__highlightCode(t).catch(function(){return null}))})}},{key:"__highlightCode",value:function(e){return(0,n._)(function(){var t,a,n;return(0,d._)(this,function(i){switch(i.label){case 0:return t=this.__parseLanguage(e),[4,this.__initHighlightLibLoading(t)];case 1:return a=i.sent().highlight,n=e,e.firstElementChild===e.lastElementChild&&C.Dom.isTag(e.firstElementChild,"code")&&(n=e.firstElementChild),n.innerHTML=a(n.innerText,t),[2]}})}).call(this)}},{key:"onPreEdit",value:function(e){var t=C.Dom.isNode(e)&&C.Dom.isTag(e,"pre")?e:C.Dom.closest(e.target,"pre",this.j.editor);if(t){var a=this.__parseLanguage(t);this.__openCodeEditDialog(a,t.innerText,t)}}},{key:"__parseLanguage",value:function(e){var t=null,a=function(e){return e.classList.forEach(function(e){if(/language-/.test(e)){var a=/language-(.*)/.exec(e);a&&a[1]&&(t=a[1])}})};return a(e),null==t&&e.firstElementChild===e.lastElementChild&&C.Dom.isTag(e.firstElementChild,"code")&&a(e.firstElementChild),this.jodit.o.pasteCode.canonicalLanguageCode(t||"html")}},{key:"onAfterGetValueFromEditor",value:function(e){var t=this,a=function(e,a,n,i,o,r){return"".concat(a.trim()).concat(i).concat((0,m.htmlspecialchars)((0,p.stripTags)(o,t.j.ed,new Set(["br"])))).concat(r)};e.value=e.value.replace(RegExp("(<pre[^>]*)contenteditable\\s*=\\s*(['\"]?)false\\2([^>]*>\\s*<code[^>]*>)(.*?)(<\\/code>\\s*<\\/pre>)","gis"),a).replace(RegExp("(<pre[^>]*)contenteditable\\s*=\\s*(['\"]?)false\\2([^>]*>)(.*?)(<\\/pre>)","gis"),a)}}]),t}((0,c._)(v.Plugin));function x(e,t){return e.promise(function(e,a){t.then(e).catch(a)}).catch(function(){return null})}(0,l._)(L,"requires",["license"]),(0,u.__decorate)([g.autobind],L.prototype,"__openCodeEditDialog",null),(0,u.__decorate)([(0,g.watch)(["?:change","?:afterInit"]),(0,g.debounce)()],L.prototype,"__onChange",null),(0,u.__decorate)([(0,g.watch)(["?:dblclick","?:editPreInPasteCode"])],L.prototype,"onPreEdit",null),(0,u.__decorate)([(0,g.watch)("?:afterGetValueFromEditor")],L.prototype,"onAfterGetValueFromEditor",null),L=(0,u.__decorate)([g.component],L),b.JoditPro.plugins.add("paste-code",L)}},function(e){return e(e.s=41406)}])});
8
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var i in o)("object"==typeof exports?exports:e)[i]=o[i]}}(self,function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[150],{75689:function(e){e.exports='<svg viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> <path d="M2.5244141,23.5h18.9511719c0.4140625,0,0.75-0.3359375,0.75-0.75V4.9208984 c0-0.1992188-0.0795898-0.390625-0.2207031-0.53125L18.3198242,0.71875C18.1791992,0.5786133,17.9887695,0.5,17.7905273,0.5 H2.5244141c-0.4140625,0-0.75,0.3359375-0.75,0.75v21.5C1.7744141,23.1640625,2.1103516,23.5,2.5244141,23.5z M20.7128296,5.2197266 h-2.6986694V2.531189L20.7128296,5.2197266z M3.2744141,2h13.2397461v3.9697266c0,0.4140625,0.3359375,0.75,0.75,0.75h3.4614258V22 H3.2744141V2z" fill="#1D1D1D"/> <path d="M8.75,10.25h1.75c0.4140625,0,0.75-0.3359375,0.75-0.75s-0.3359375-0.75-0.75-0.75H8 c-0.4140625,0-0.75,0.3359375-0.75,0.75v2.75H6c-0.4140625,0-0.75,0.3359375-0.75,0.75S5.5859375,13.75,6,13.75h1.25v2.75 c0,0.4140625,0.3359375,0.75,0.75,0.75h2.5c0.4140625,0,0.75-0.3359375,0.75-0.75s-0.3359375-0.75-0.75-0.75H8.75V10.25z" fill="#1D1D1D"/> <path d="M18.5,12.25h-1.25V9.5c0-0.4140625-0.3359375-0.75-0.75-0.75H14c-0.4140625,0-0.75,0.3359375-0.75,0.75 s0.3359375,0.75,0.75,0.75h1.75v5.5H14c-0.4140625,0-0.75,0.3359375-0.75,0.75s0.3359375,0.75,0.75,0.75h2.5 c0.4140625,0,0.75-0.3359375,0.75-0.75v-2.75h1.25c0.4140625,0,0.75-0.3359375,0.75-0.75S18.9140625,12.25,18.5,12.25z" fill="#1D1D1D"/></svg>'},83967:function(e,t,o){"use strict";var i=o(35960),n=o(75689),a=o.n(n),r=o(6441),s=o(22732),c=o(53326);r.Config.prototype.controls.pasteCode={icon:a(),tooltip:"Paste code",command:"pasteCode"},r.Config.prototype.controls.codeBlock={edit:{icon:"pencil",tooltip:"Edit code",exec:function(e,t){e.e.fire("editPreInPasteCode",t)}},copy:{icon:"copy",tooltip:"Copy code",exec:function(e,t){s.Dom.isTag(t,"pre")&&(0,i.copyCodeToClipboard)(e,t)}},remove:{icon:"bin",tooltip:"Delete",exec:function(e,t){s.Dom.safeRemove(t),e.e.fire("synchro"),e.e.fire("hideCodeTuner.pasteCode")}}},r.Config.prototype.pasteCode={globalHighlightLib:!1,canonicalLanguageCode:function(e){switch(e){case"ts":return"typescript";case"js":return"javascript";case"markup":return"html"}return e},highlightLib:{beforeLibLoad:function(){window.Prism=window.Prism||{},window.Prism.manual=!0},highlight:function(e,t){return"u">typeof Prism?Prism.highlight(e,Prism.languages[t]||Prism.languages.plain,t):(0,c.htmlspecialchars)(e)},isLangLoaded:function(e){return"html"===e||"u">typeof Prism&&!!Prism.languages[e]},js:["https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js","https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"],langUrl:function(e){return"https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-".concat(e,".min.js")},css:["https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css"]},defaultLanguage:"html",insertTemplate:function(e,t,o){return'<pre class="language-'.concat(t,'">').concat((0,c.htmlspecialchars)(o),"</pre>")},popup:["codeBlock.edit","codeBlock.copy","|","codeBlock.remove"],languages:[{value:"plaintext",text:"Plain"},{value:"html",text:"HTML/XML"},{value:"bash",text:"Bash"},{value:"php",text:"PHP"},{value:"javascript",text:"JavaScript"},{value:"typescript",text:"TypeScript"},{value:"jsx",text:"JSX"},{value:"java",text:"Java"},{value:"css",text:"CSS"},{value:"php",text:"PHP"},{value:"ruby",text:"Ruby"},{value:"python",text:"Python"},{value:"java",text:"Java"},{value:"c",text:"C"},{value:"csharp",text:"C#"},{value:"cpp",text:"C++"},{value:"sql",text:"SQL"},{value:"docker",text:"Docker"},{value:"http",text:"HTTP"},{value:"ini",text:"INI"},{value:"yaml",text:"YAML"},{value:"json",text:"JSON"},{value:"json5",text:"JSON5"},{value:"makefile",text:"Makefile"},{value:"swift",text:"Swift"}],dialog:{width:700,height:600}}},35960:function(e,t,o){"use strict";o.d(t,{copyCodeToClipboard:function(){return c},languageTitle:function(){return r},parseLanguage:function(){return a},setPreLanguage:function(){return s}});var i=o(22732);function n(e){return e.firstElementChild===e.lastElementChild&&i.Dom.isTag(e.firstElementChild,"code")?e.firstElementChild:e}function a(e,t){var o=null,i=function(e){return e.classList.forEach(function(e){var t=/^language-(.+)/.exec(e);t&&t[1]&&(o=t[1])})};i(t);var a=n(t);return null==o&&a!==t&&i(a),e.o.pasteCode.canonicalLanguageCode(o||"html")}function r(e,t){var o=e.o.pasteCode.languages.find(function(e){return String(e.value)===t});return e.i18n(String(o?o.text:t))}function s(e,t,o){var i=function(e){return Array.from(e.classList).forEach(function(t){/^language-/.test(t)&&e.classList.remove(t)})};i(t);var a=n(t);a!==t&&i(a),a.classList.add("language-".concat(o)),e.e.fire("rehighlightPasteCode",t),e.e.fire("synchro")}function c(e,t){var o=t.innerText,n=e.ow.navigator;if(n&&n.clipboard&&n.clipboard.writeText)n.clipboard.writeText(o).catch(function(){return null});else{var a=e.create.element("textarea");a.value=o,a.style.position="fixed",a.style.opacity="0",e.od.body.appendChild(a),a.select();try{e.od.execCommand("copy")}catch(e){}i.Dom.safeRemove(a)}e.e.fire("afterCopyCode.pasteCode",o)}},41406:function(e,t,o){"use strict";o.r(t),o.d(t,{pasteCode:function(){return k}});var i=o(77688),n=o(80294),a=o(20616),r=o(67709),s=o(82749),c=o(18766),l=o(23078),u=o(31635),h=o(62361);o(83967);var d=o(24397),p=o(35960),f=o(82758),g=o(65478),_=o(21537),v=o(87612),m=o(53326),C=o(50911),y=o(67510),j=o(41409),b=o(2692),k=function(e){function t(){var e;return(0,a._)(this,t),e=(0,n._)(this,t,arguments),(0,s._)(e,"buttons",[{name:"pasteCode",group:"clipboard"}]),(0,s._)(e,"__codeTuner",void 0),(0,s._)(e,"__highlightLibJSIsLoaded",!1),(0,s._)(e,"__loadLanguage",new Map),(0,s._)(e,"__initHighlightLibLoading",function(t){return(0,i._)(function(){var o,i,n,a,r,s,c,l,u,d;return(0,h._)(this,function(h){switch(h.label){case 0:if(i=(o=e.j.o.pasteCode).globalHighlightLib,a=(n=o.highlightLib).css,r=n.js,s=n.langUrl,c=n.highlight,l=n.isLangLoaded,u=n.beforeLibLoad,d=n.afterLibLoad,e.__highlightLibJSIsLoaded||i||(e.__highlightLibJSIsLoaded=Promise.resolve(null==u?void 0:u()).then(function(){return x(e.async,Promise.allSettled([(0,_.loadNextStyle)(e.jodit,a).catch(function(){return null}),(0,_.loadNext)(e.jodit,r).catch(function(){return null})]))}).then(function(){return null==d?void 0:d()})),(0,v.isBoolean)(e.__highlightLibJSIsLoaded))return[3,2];return[4,e.__highlightLibJSIsLoaded];case 1:h.sent(),h.label=2;case 2:if(!(t&&!l(t)&&!i))return[3,4];return e.__loadLanguage.has(t)||(f.IS_PROD,e.__loadLanguage.set(t,x(e.async,(0,_.appendScriptAsync)(e.jodit,s(t)).catch(function(){return null})))),[4,e.__loadLanguage.get(t)];case 3:h.sent(),h.label=4;case 4:return[2,{highlight:c}]}})})()}),e}return(0,c._)(t,e),(0,r._)(t,[{key:"className",value:function(){return"pasteCode"}},{key:"afterInit",value:function(e){var t=this;e.registerCommand("pasteCode",function(){return t.__openCodeEditDialog()}),this.__codeTuner=new d.UICodeTuner(e),e.async.requestIdleCallback(function(){return t.__initHighlightLibLoading()})}},{key:"__openCodeEditDialog",value:function(e,t,o){var i=this,n=this.j,a=this.__createForm(),r=(0,_.refs)(a.container),s=r.code,c=r.language;e&&(c.value=e),t&&(s.value=t),n.async.requestIdleCallback(function(){s.focus()}),n.s.save(),this.__createDialog(function(){if(a.validate()){n.s.restore();var e=n.createInside.fromHTML(n.o.pasteCode.insertTemplate(n,c.value,s.value));if(o)j.Dom.replace(o,e,n.createInside,!1,!0);else{var t=n.s.current(),r=j.Dom.up(t,j.Dom.isBlock,n.editor);r&&!j.Dom.isCell(r)?j.Dom.after(r,e):n.s.insertNode(e)}i.__imdOnChange();return}return!1},function(){n.s.restore()}).setContent(a.container).open(!0)}},{key:"beforeDestruct",value:function(e){var t;null==(t=this.__codeTuner)||t.destruct()}},{key:"onRehighlightPasteCode",value:function(e){j.Dom.isTag(e,"pre")&&((0,_.attr)(e,"contenteditable",!1),this.__highlightCode(e).catch(function(){return null}))}},{key:"__createForm",value:function(){var e=this.jodit;return new y.UIForm(e,[new y.UISelect(e,{name:"language",label:"Language",value:e.o.pasteCode.defaultLanguage,options:e.o.pasteCode.languages,required:!0}),new y.UITextArea(e,{label:"Code view",resizable:!1,name:"code",required:!0,className:"jodit-paste-code__textarea"})],{className:"jodit-paste-code"})}},{key:"__createDialog",value:function(e,t){var o=new j.Dialog({language:this.j.o.language});return o.setHeader("Insert/Edit Code Sample").setSize(this.j.o.pasteCode.dialog.width,this.j.o.pasteCode.dialog.height).setFooter([(0,y.Button)(o,"","Cancel","default").onAction(function(){o.close(),t()}),(0,y.Button)(o,"save","Save","primary").onAction(function(){o.close(),e()})]),o}},{key:"__onChange",value:function(){this.__imdOnChange()}},{key:"__imdOnChange",value:function(){var e=this;(0,_.$$)("pre",this.j.editor).forEach(function(t){(0,_.attr)(t,"contenteditable")||((0,_.attr)(t,"contenteditable",!1),e.__highlightCode(t).catch(function(){return null}))})}},{key:"__highlightCode",value:function(e){return(0,i._)(function(){var t,o,i;return(0,h._)(this,function(n){switch(n.label){case 0:return t=this.__parseLanguage(e),[4,this.__initHighlightLibLoading(t)];case 1:return o=n.sent().highlight,i=e,e.firstElementChild===e.lastElementChild&&j.Dom.isTag(e.firstElementChild,"code")&&(i=e.firstElementChild),i.innerHTML=o(i.innerText,t),[2]}})}).call(this)}},{key:"onPreEdit",value:function(e){var t=j.Dom.isNode(e)&&j.Dom.isTag(e,"pre")?e:j.Dom.closest(e.target,"pre",this.j.editor);if(t){var o=this.__parseLanguage(t);this.__openCodeEditDialog(o,t.innerText,t)}}},{key:"__parseLanguage",value:function(e){return(0,p.parseLanguage)(this.jodit,e)}},{key:"onAfterGetValueFromEditor",value:function(e){var t=this,o=function(e,o,i,n,a,r){return"".concat(o.trim()).concat(n).concat((0,m.htmlspecialchars)((0,_.stripTags)(a,t.j.ed,new Set(["br"])))).concat(r)};e.value=e.value.replace(RegExp("(<pre[^>]*)contenteditable\\s*=\\s*(['\"]?)false\\2([^>]*>\\s*<code[^>]*>)(.*?)(<\\/code>\\s*<\\/pre>)","gis"),o).replace(RegExp("(<pre[^>]*)contenteditable\\s*=\\s*(['\"]?)false\\2([^>]*>)(.*?)(<\\/pre>)","gis"),o)}}]),t}((0,l._)(C.Plugin));function x(e,t){return e.promise(function(e,o){t.then(e).catch(o)}).catch(function(){return null})}(0,s._)(k,"requires",["license"]),(0,u.__decorate)([g.autobind],k.prototype,"__openCodeEditDialog",null),(0,u.__decorate)([(0,g.watch)("?:rehighlightPasteCode")],k.prototype,"onRehighlightPasteCode",null),(0,u.__decorate)([(0,g.watch)(["?:change","?:afterInit"]),(0,g.debounce)()],k.prototype,"__onChange",null),(0,u.__decorate)([(0,g.watch)(["?:dblclick","?:editPreInPasteCode"])],k.prototype,"onPreEdit",null),(0,u.__decorate)([(0,g.watch)("?:afterGetValueFromEditor")],k.prototype,"onAfterGetValueFromEditor",null),k=(0,u.__decorate)([g.component],k),b.JoditPro.plugins.add("paste-code",k)},24397:function(e,t,o){"use strict";o.d(t,{UICodeTuner:function(){return m}});var i=o(80294),n=o(20616),a=o(67709),r=o(82749),s=o(54816),c=o(84669),l=o(18766),u=o(94899),h=o(31635),d=o(35960),p=o(65478),f=o(22732),g=o(21537),_=o(67510),v=o(21491),m=function(e){function t(){var e;return(0,n._)(this,t),e=(0,i._)(this,t,arguments),(0,r._)(e,"toolbar",(0,v.makeCollection)(e.j,e)),(0,r._)(e,"popup",new _.Popup(e.j,!1)),(0,r._)(e,"isShown",!1),(0,r._)(e,"__hideTimer",0),(0,r._)(e,"currentBlock",void 0),e}return(0,l._)(t,e),(0,a._)(t,[{key:"className",value:function(){return"UICodeTuner"}},{key:"render",value:function(){return'<div>\n <div class="&__anchor" title="~Drag to move the code block~"></div>\n </div>'}},{key:"onEditorMouseMove",value:function(e){var t=f.Dom.closest(e.target,"pre",this.j.editor);t&&(this.__cancelHide(),this.show(t))}},{key:"onEditorClick",value:function(e){var t=f.Dom.closest(e.target,"pre",this.j.editor);t?(this.__cancelHide(),this.show(t),this.openToolbar()):this.forceHide()}},{key:"show",value:function(e){this.currentBlock=e,this.isShown||(this.isShown=!0,null==this.container.parentNode&&this.j.od.body.appendChild(this.container),this.j.e.on(this.j.ow,"mousemove",this.__onPointerMove),this.j.e.on(this.j.ow,"scroll resize",this.__onReposition).on(this.j.editor,"scroll",this.__onReposition)),this.calcPosition()}},{key:"hide",value:function(){this.popup.isOpened||this.forceHide()}},{key:"onOutsideClick",value:function(e){e&&f.Dom.isOrContains(this.container,e.target)||this.forceHide()}},{key:"forceHide",value:function(){this.__cancelHide(),this.isShown&&(this.isShown=!1,this.j.e.off(this.j.ow,"mousemove",this.__onPointerMove).off(this.j.ow,"scroll resize",this.__onReposition).off(this.j.editor,"scroll",this.__onReposition),this.popup.close(),f.Dom.safeRemove(this.container))}},{key:"__onPointerMove",value:function(e){this.isShown&&!this.popup.isOpened&&(this.__inActiveZone(e.clientX,e.clientY)?this.__cancelHide():this.__scheduleHide())}},{key:"__inActiveZone",value:function(e,t){var o=(0,g.position)(this.currentBlock,this.j);return e>=o.left-16-6-6&&e<=o.left+o.width&&t>=o.top-6&&t<=o.top+o.height+6}},{key:"__scheduleHide",value:function(){var e=this;this.__hideTimer||(this.__hideTimer=this.j.async.setTimeout(function(){e.__hideTimer=0,e.hide()},150))}},{key:"__cancelHide",value:function(){this.__hideTimer&&(this.j.async.clearTimeout(this.__hideTimer),this.__hideTimer=0)}},{key:"__onReposition",value:function(){if(this.isShown){if(!this.j.editor.contains(this.currentBlock))return void this.forceHide();this.calcPosition()}}},{key:"onEditorChange",value:function(){this.__onReposition()}},{key:"calcPosition",value:function(){var e=(0,g.position)(this.currentBlock,this.j);(0,g.css)(this.container,{left:Math.round(e.left-16-6),top:Math.round(e.top+4)}),this.popup.isOpened&&this.popup.updatePosition()}},{key:"openToolbar",value:function(){var e=this;this.toolbar.build([this.__languageControl()].concat((0,u._)(this.j.o.pasteCode.popup)),this.currentBlock),this.popup.setContent(this.toolbar.container),this.popup.isOpened?this.popup.updatePosition():this.popup.open(function(){return(0,g.position)(e.currentBlock,e.j)})}},{key:"__languageControl",value:function(){var e=this,t={};return this.j.o.pasteCode.languages.forEach(function(e){t[String(e.value)]=String(e.text)}),{name:"language",list:t,tooltip:"Language",text:(0,d.languageTitle)(this.j,(0,d.parseLanguage)(this.j,this.currentBlock)),childTemplate:function(t,o,i){return e.j.i18n(i)},update:function(t,o){var i=o.target;f.Dom.isTag(i,"pre")&&o.setState({text:(0,d.languageTitle)(e.j,(0,d.parseLanguage)(e.j,i)),icon:{name:""}})},childExec:function(t,o,i){var n=i.control,a=String(n.args&&n.args[0]||"plaintext");f.Dom.isTag(o,"pre")&&((0,d.setPreLanguage)(e.j,o,a),e.j.e.fire("hideCodeTuner.pasteCode"))}}}},{key:"onAnchorMouseDown",value:function(e){e.preventDefault(),this.popup.close(),this.j.e.fire("startDragElement",this.currentBlock,e)}},{key:"destruct",value:function(){this.forceHide(),this.popup.destruct(),(0,s._)((0,c._)(t.prototype),"destruct",this).call(this)}}]),t}(_.UIElement);(0,h.__decorate)([(0,p.watch)("j.editor:mousemove"),(0,p.throttle)(50)],m.prototype,"onEditorMouseMove",null),(0,h.__decorate)([(0,p.watch)("j.editor:click")],m.prototype,"onEditorClick",null),(0,h.__decorate)([(0,p.watch)(":outsideClick")],m.prototype,"onOutsideClick",null),(0,h.__decorate)([(0,p.watch)(":hideCodeTuner.pasteCode")],m.prototype,"forceHide",null),(0,h.__decorate)([p.autobind],m.prototype,"__onPointerMove",null),(0,h.__decorate)([p.autobind],m.prototype,"__onReposition",null),(0,h.__decorate)([(0,p.watch)(":change :resize :afterSetMode"),(0,p.throttle)(10)],m.prototype,"onEditorChange",null),(0,h.__decorate)([(0,p.watch)("anchor:mousedown")],m.prototype,"onAnchorMouseDown",null),m=(0,h.__decorate)([p.component],m)}},function(e){return e(e.s=41406)}])});
@@ -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.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -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.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -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.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -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.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -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.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -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.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -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.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -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.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -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.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -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.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -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.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -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.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -162,6 +162,14 @@ var TodoList = /*#__PURE__*/ function(Plugin) {
162
162
  if (li.querySelector('label.' + labelClassName)) {
163
163
  return;
164
164
  }
165
+ // Items pasted from Word/Google Docs wrap their text into a
166
+ // paragraph (`<li><p>text</p></li>`) — the block element next to the
167
+ // inline label pushes the text to a new line and creates the extra
168
+ // vertical spacing. Unwrap a single paragraph wrapper. See
169
+ // https://github.com/xdan/jodit/issues/1068
170
+ if (li.children.length === 1 && jodit_esm_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.isTag(li.firstElementChild, 'p')) {
171
+ jodit_esm_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.unwrap(li.firstElementChild);
172
+ }
165
173
  var label = jodit.createInside.element('label', {
166
174
  contenteditable: 'false',
167
175
  class: labelClassName
@@ -1,8 +1,8 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
8
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var i in o)("object"==typeof exports?exports:e)[i]=o[i]}}(self,function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[502],{11373:function(e){e.exports='<svg stroke="black" stroke-linejoin="round" stroke-linecap="round" stroke-width="28" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"> \x3c!-- <rect fill="none" height="256" width="256"/>--\x3e <line fill="none" x1="130" x2="241" y1="54" y2="54"/> <line fill="none" x1="130" x2="241" y1="128" y2="128"/> <line fill="none" x1="130" x2="241" y1="202" y2="202"/> <polyline fill="none" points="92 38 57.3 70 40 54"/> <polyline fill="none" points="92 112 57.3 144 40 128"/> <polyline fill="none" points="92 186 57.3 218 40 202"/> </svg>'},64839:function(e,t,o){"use strict";var i=o(11373),n=o.n(i),a=o(6441),s=o(2748),l=o(12153);a.Config.prototype.todoList={className:"todo-list",labelClassName:"todo-list__label",inputFactory:function(e){return e.createInside.element("input",{type:"checkbox",tabindex:-1})}},a.Config.prototype.controls.todoList={tooltip:"To-do List",icon:"todo-list",command:"todolist",isActive:function(e){var t=e.s.current();return!!(t&&s.Dom.closest(t,function(e){return s.Dom.isElement(e)&&s.Dom.isTag(e,"ul")&&e.classList.contains("todo-list")},e.editor))}},l.Icon.set("todo-list",n())},19374:function(e,t,o){"use strict";o.r(t),o.d(t,{TodoList:function(){return y}});var i=o(80294),n=o(20616),a=o(67709),s=o(82749),l=o(18766),r=o(23078),c=o(31635);o(64839);var u=o(82758),p=o(65478),_=o(2748),d=o(43555),f=o(50911),m=o(59242),h=o(2692),y=function(e){function t(){var e;return(0,n._)(this,t),e=(0,i._)(this,t,arguments),(0,s._)(e,"buttons",[{name:"todoList",group:"list"}]),(0,s._)(e,"__isOwnCommand",!1),e}return(0,l._)(t,e),(0,a._)(t,[{key:"afterInit",value:function(e){e.registerCommand("todoList",this.onCommand)}},{key:"onCommand",value:function(){try{this.__isOwnCommand=!0,this.jodit.s.commitStyle({element:"ul",attributes:{class:this.j.o.todoList.className},hooks:{afterWrapList:this.__afterWrapList,afterToggleAttribute:this.__afterWrapList}})}finally{this.__isOwnCommand=!1}return!1}},{key:"__prependInputLabel",value:function(e){var t=this.jodit,o=this.j.o.todoList,i=o.labelClassName,n=o.inputFactory;if(!e.querySelector("label."+i)){var a=t.createInside.element("label",{contenteditable:"false",class:i}),s=n(t);a.appendChild(s),_.Dom.prepend(e,a)}}},{key:"__afterToggleList",value:function(e,t){return(e===m.CHANGE||e===m.REPLACE)&&this.__isOwnCommand?this.__appendInputs(t):e===m.UNWRAP||e===m.REPLACE||e===m.CHANGE?this.__removeInputs(t):void 0}},{key:"__appendInputs",value:function(e){e.querySelectorAll("li").forEach(this.__prependInputLabel)}},{key:"__removeInputs",value:function(e){var t=this.j.o.todoList.labelClassName;e.querySelectorAll("label."+t).forEach(_.Dom.safeRemove)}},{key:"__beforeToggleOrderedList",value:function(e,t,o){var i,n="__beforeToggleOrderedList";if(e!==m.REPLACE&&(t.classList.contains(this.j.o.todoList.className)||o.isApplied(t,n))&&("ul"===o.element||"ol"===o.element)&&(null==(i=o.options.attributes)?void 0:i.class)!==this.j.o.todoList.className){var a=_.Dom.replace(t,o.element,this.jodit.createInside);return o.setApplied(a,n),this.__removeInputs(a),a}}},{key:"__afterEnter",value:function(){(0,d.$$)("ul."+this.j.o.todoList.className+" li",this.jodit.editor).forEach(this.__prependInputLabel)}},{key:"__afterTab",value:function(){(0,d.$$)("ul:not(."+this.j.o.todoList.className+") > li > label",this.jodit.editor).filter(this.isTodoLeafLabel).forEach(_.Dom.safeRemove)}},{key:"__changeSelection",value:function(e){var t=this.j.s.current();this.isTodoLeafLabel(t)&&(e.preventDefault(),e.stopPropagation(),this.j.s.setCursorAfter(t))}},{key:"__isEmptyListLeaf",value:function(e){var t=this;return _.Dom.isEmpty(e,function(e){return!("input"===e.nodeName.toLowerCase()&&t.isTodoLeafLabel(e.parentElement))&&u.NO_EMPTY_TAGS.has(e.tagName.toLowerCase())})}},{key:"__backSpaceBeforeCases",value:function(e,t){if(e){var o=_.Dom.findNotEmptySibling(t,!0);this.isTodoLeafLabel(o)&&_.Dom.safeRemove(o)}}},{key:"__isInvisibleForCursor",value:function(e){if(this.isTodoLeafLabel(e))return!0}},{key:"__backSpaceAfterDelete",value:function(){var e=this,t=this.j.o.todoList.labelClassName;(0,d.$$)("label."+t,this.jodit.editor).forEach(function(t){t.closest("ul."+e.j.o.todoList.className)?t.previousSibling&&t.parentElement&&_.Dom.prepend(t.parentElement,t):_.Dom.safeRemove(t)})}},{key:"__afterWrapList",value:function(e,t){e===m.WRAP&&this.__appendInputs(t)}},{key:"__onClickInput",value:function(e){var t=e.target;t&&_.Dom.isTag(t,"input")&&"checkbox"===t.type&&this.isTodoLeafLabel(t.parentElement)&&(0,d.attr)(t,"checked",t.checked?"checked":null)}},{key:"isTodoLeafLabel",value:function(e){var t=this.j.o.todoList.labelClassName;return _.Dom.isHTMLElement(e)&&e.classList.contains(t)}},{key:"beforeDestruct",value:function(e){}}]),t}((0,r._)(f.Plugin));(0,s._)(y,"requires",["license"]),(0,c.__decorate)([p.autobind],y.prototype,"onCommand",null),(0,c.__decorate)([p.autobind],y.prototype,"__prependInputLabel",null),(0,c.__decorate)([(0,p.watch)(":commitStyleAfterToggleList")],y.prototype,"__afterToggleList",null),(0,c.__decorate)([(0,p.watch)(":commitStyleBeforeUnwrapList")],y.prototype,"__beforeToggleOrderedList",null),(0,c.__decorate)([(0,p.watch)(":afterEnter")],y.prototype,"__afterEnter",null),(0,c.__decorate)([(0,p.watch)(":afterTab")],y.prototype,"__afterTab",null),(0,c.__decorate)([(0,p.watch)("j.ed:selectionchange"),(0,p.watch)(":afterEnter")],y.prototype,"__changeSelection",null),(0,c.__decorate)([(0,p.watch)(":enterIsEmptyListLeaf")],y.prototype,"__isEmptyListLeaf",null),(0,c.__decorate)([(0,p.watch)(":backSpaceBeforeCases")],y.prototype,"__backSpaceBeforeCases",null),(0,c.__decorate)([(0,p.watch)(":backSpaceIsMovedIgnore"),(0,p.watch)(":isInvisibleForCursor")],y.prototype,"__isInvisibleForCursor",null),(0,c.__decorate)([(0,p.watch)(":backSpaceAfterDelete")],y.prototype,"__backSpaceAfterDelete",null),(0,c.__decorate)([p.autobind],y.prototype,"__afterWrapList",null),(0,c.__decorate)([(0,p.watch)(":click")],y.prototype,"__onClickInput",null),(0,c.__decorate)([p.autobind],y.prototype,"isTodoLeafLabel",null),h.JoditPro.plugins.add("todo-list",y)}},function(e){return e(e.s=19374)}])});
8
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var i in o)("object"==typeof exports?exports:e)[i]=o[i]}}(self,function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[502],{11373:function(e){e.exports='<svg stroke="black" stroke-linejoin="round" stroke-linecap="round" stroke-width="28" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"> \x3c!-- <rect fill="none" height="256" width="256"/>--\x3e <line fill="none" x1="130" x2="241" y1="54" y2="54"/> <line fill="none" x1="130" x2="241" y1="128" y2="128"/> <line fill="none" x1="130" x2="241" y1="202" y2="202"/> <polyline fill="none" points="92 38 57.3 70 40 54"/> <polyline fill="none" points="92 112 57.3 144 40 128"/> <polyline fill="none" points="92 186 57.3 218 40 202"/> </svg>'},64839:function(e,t,o){"use strict";var i=o(11373),n=o.n(i),a=o(6441),s=o(2748),l=o(12153);a.Config.prototype.todoList={className:"todo-list",labelClassName:"todo-list__label",inputFactory:function(e){return e.createInside.element("input",{type:"checkbox",tabindex:-1})}},a.Config.prototype.controls.todoList={tooltip:"To-do List",icon:"todo-list",command:"todolist",isActive:function(e){var t=e.s.current();return!!(t&&s.Dom.closest(t,function(e){return s.Dom.isElement(e)&&s.Dom.isTag(e,"ul")&&e.classList.contains("todo-list")},e.editor))}},l.Icon.set("todo-list",n())},19374:function(e,t,o){"use strict";o.r(t),o.d(t,{TodoList:function(){return y}});var i=o(80294),n=o(20616),a=o(67709),s=o(82749),l=o(18766),r=o(23078),c=o(31635);o(64839);var u=o(82758),p=o(65478),d=o(2748),_=o(43555),f=o(50911),m=o(59242),h=o(2692),y=function(e){function t(){var e;return(0,n._)(this,t),e=(0,i._)(this,t,arguments),(0,s._)(e,"buttons",[{name:"todoList",group:"list"}]),(0,s._)(e,"__isOwnCommand",!1),e}return(0,l._)(t,e),(0,a._)(t,[{key:"afterInit",value:function(e){e.registerCommand("todoList",this.onCommand)}},{key:"onCommand",value:function(){try{this.__isOwnCommand=!0,this.jodit.s.commitStyle({element:"ul",attributes:{class:this.j.o.todoList.className},hooks:{afterWrapList:this.__afterWrapList,afterToggleAttribute:this.__afterWrapList}})}finally{this.__isOwnCommand=!1}return!1}},{key:"__prependInputLabel",value:function(e){var t=this.jodit,o=this.j.o.todoList,i=o.labelClassName,n=o.inputFactory;if(!e.querySelector("label."+i)){1===e.children.length&&d.Dom.isTag(e.firstElementChild,"p")&&d.Dom.unwrap(e.firstElementChild);var a=t.createInside.element("label",{contenteditable:"false",class:i}),s=n(t);a.appendChild(s),d.Dom.prepend(e,a)}}},{key:"__afterToggleList",value:function(e,t){return(e===m.CHANGE||e===m.REPLACE)&&this.__isOwnCommand?this.__appendInputs(t):e===m.UNWRAP||e===m.REPLACE||e===m.CHANGE?this.__removeInputs(t):void 0}},{key:"__appendInputs",value:function(e){e.querySelectorAll("li").forEach(this.__prependInputLabel)}},{key:"__removeInputs",value:function(e){var t=this.j.o.todoList.labelClassName;e.querySelectorAll("label."+t).forEach(d.Dom.safeRemove)}},{key:"__beforeToggleOrderedList",value:function(e,t,o){var i,n="__beforeToggleOrderedList";if(e!==m.REPLACE&&(t.classList.contains(this.j.o.todoList.className)||o.isApplied(t,n))&&("ul"===o.element||"ol"===o.element)&&(null==(i=o.options.attributes)?void 0:i.class)!==this.j.o.todoList.className){var a=d.Dom.replace(t,o.element,this.jodit.createInside);return o.setApplied(a,n),this.__removeInputs(a),a}}},{key:"__afterEnter",value:function(){(0,_.$$)("ul."+this.j.o.todoList.className+" li",this.jodit.editor).forEach(this.__prependInputLabel)}},{key:"__afterTab",value:function(){(0,_.$$)("ul:not(."+this.j.o.todoList.className+") > li > label",this.jodit.editor).filter(this.isTodoLeafLabel).forEach(d.Dom.safeRemove)}},{key:"__changeSelection",value:function(e){var t=this.j.s.current();this.isTodoLeafLabel(t)&&(e.preventDefault(),e.stopPropagation(),this.j.s.setCursorAfter(t))}},{key:"__isEmptyListLeaf",value:function(e){var t=this;return d.Dom.isEmpty(e,function(e){return!("input"===e.nodeName.toLowerCase()&&t.isTodoLeafLabel(e.parentElement))&&u.NO_EMPTY_TAGS.has(e.tagName.toLowerCase())})}},{key:"__backSpaceBeforeCases",value:function(e,t){if(e){var o=d.Dom.findNotEmptySibling(t,!0);this.isTodoLeafLabel(o)&&d.Dom.safeRemove(o)}}},{key:"__isInvisibleForCursor",value:function(e){if(this.isTodoLeafLabel(e))return!0}},{key:"__backSpaceAfterDelete",value:function(){var e=this,t=this.j.o.todoList.labelClassName;(0,_.$$)("label."+t,this.jodit.editor).forEach(function(t){t.closest("ul."+e.j.o.todoList.className)?t.previousSibling&&t.parentElement&&d.Dom.prepend(t.parentElement,t):d.Dom.safeRemove(t)})}},{key:"__afterWrapList",value:function(e,t){e===m.WRAP&&this.__appendInputs(t)}},{key:"__onClickInput",value:function(e){var t=e.target;t&&d.Dom.isTag(t,"input")&&"checkbox"===t.type&&this.isTodoLeafLabel(t.parentElement)&&(0,_.attr)(t,"checked",t.checked?"checked":null)}},{key:"isTodoLeafLabel",value:function(e){var t=this.j.o.todoList.labelClassName;return d.Dom.isHTMLElement(e)&&e.classList.contains(t)}},{key:"beforeDestruct",value:function(e){}}]),t}((0,r._)(f.Plugin));(0,s._)(y,"requires",["license"]),(0,c.__decorate)([p.autobind],y.prototype,"onCommand",null),(0,c.__decorate)([p.autobind],y.prototype,"__prependInputLabel",null),(0,c.__decorate)([(0,p.watch)(":commitStyleAfterToggleList")],y.prototype,"__afterToggleList",null),(0,c.__decorate)([(0,p.watch)(":commitStyleBeforeUnwrapList")],y.prototype,"__beforeToggleOrderedList",null),(0,c.__decorate)([(0,p.watch)(":afterEnter")],y.prototype,"__afterEnter",null),(0,c.__decorate)([(0,p.watch)(":afterTab")],y.prototype,"__afterTab",null),(0,c.__decorate)([(0,p.watch)("j.ed:selectionchange"),(0,p.watch)(":afterEnter")],y.prototype,"__changeSelection",null),(0,c.__decorate)([(0,p.watch)(":enterIsEmptyListLeaf")],y.prototype,"__isEmptyListLeaf",null),(0,c.__decorate)([(0,p.watch)(":backSpaceBeforeCases")],y.prototype,"__backSpaceBeforeCases",null),(0,c.__decorate)([(0,p.watch)(":backSpaceIsMovedIgnore"),(0,p.watch)(":isInvisibleForCursor")],y.prototype,"__isInvisibleForCursor",null),(0,c.__decorate)([(0,p.watch)(":backSpaceAfterDelete")],y.prototype,"__backSpaceAfterDelete",null),(0,c.__decorate)([p.autobind],y.prototype,"__afterWrapList",null),(0,c.__decorate)([(0,p.watch)(":click")],y.prototype,"__onClickInput",null),(0,c.__decorate)([p.autobind],y.prototype,"isTodoLeafLabel",null),h.JoditPro.plugins.add("todo-list",y)}},function(e){return e(e.s=19374)}])});
@@ -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.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -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.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -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.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -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.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -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.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -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.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -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.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
package/es5/polyfills.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.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -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.12.26
4
+ * Version: v4.12.32
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
package/esm/config.d.ts CHANGED
@@ -20,12 +20,12 @@ import type { ButtonGroup } from "jodit/esm/types/index";
20
20
  import type { ILayoutKeys } from "./plugins/keyboard/interface";
21
21
  import type { CanPromise } from "jodit/esm/types/index";
22
22
  import type { IUIOption } from "jodit/esm/types/index";
23
+ import type { IControlType } from "jodit/esm/types/index";
23
24
  import type { IStyleDefinition } from "./plugins/style/interface";
24
25
  import type { ITemplateDefinition } from "./plugins/templates/interface";
25
26
  import type { ITranslateProviderFactory } from "./plugins/translate/interface";
26
27
  import type { IGoogleTranslateProviderOptions } from "./plugins/translate/interface";
27
28
  import type { ICloudTranslateProviderOptions } from "./plugins/translate/interface";
28
- import type { IControlType } from "jodit/esm/types/index";
29
29
  declare module 'jodit/esm/config' {
30
30
  interface Config {
31
31
  loadExternalConfig: boolean;
@@ -190,6 +190,11 @@ interface Config {
190
190
  defaultLanguage: string;
191
191
  languages: IUIOption[];
192
192
  insertTemplate: (jodit: IJodit, language: string, value: string) => string;
193
+ /**
194
+ * Buttons of the contextual popup shown for an existing code block,
195
+ * after the language dropdown. Use control names or inline controls.
196
+ */
197
+ popup: Array<IControlType | string>;
193
198
  dialog: {
194
199
  width: number;
195
200
  height: number;
@@ -6,5 +6,5 @@
6
6
  import "jodit/esm/plugins/all";
7
7
  import "./paste-from-word/paste-from-word";
8
8
  import "./license/license";
9
- import "./autocomplete/autocomplete";
9
+ import "./autocomplete/autocomplete.impl";
10
10
  import "jodit/esm/plugins/speech-recognize/speech-recognize";
@@ -1 +1 @@
1
- import"jodit/esm/plugins/all.js";import"./paste-from-word/paste-from-word.js";import"./license/license.js";import"./autocomplete/autocomplete.js";import"jodit/esm/plugins/speech-recognize/speech-recognize.js";import"./ai-assistant-pro/ai-assistant-pro.js";import"./backup/backup.js";import"./button-generator/button-generator.js";import"./change-case/change-case.js";import"./color-picker/color-picker.js";import"./emoji/emoji.js";import"./export-docs/export-docs.js";import"./finder/finder.js";import"./google-maps/google-maps.js";import"./google-search/google-search.js";import"./highlight-signature/highlight-signature.js";import"./iframe-editor/iframe-editor.js";import"./keyboard/keyboard.js";import"./mobile-view/mobile-view.js";import"./page-break/page-break.js";import"./paste-code/paste-code.js";import"./show-blocks/show-blocks.js";import"./style/style.js";import"./templates/templates.js";import"./todo-list/todo-list.js";import"./translate/translate.js";import"./tune-block/tune-block.js";
1
+ import"jodit/esm/plugins/all.js";import"./paste-from-word/paste-from-word.js";import"./license/license.js";import"./autocomplete/autocomplete.impl.js";import"jodit/esm/plugins/speech-recognize/speech-recognize.js";import"./ai-assistant-pro/ai-assistant-pro.js";import"./backup/backup.js";import"./button-generator/button-generator.js";import"./change-case/change-case.js";import"./color-picker/color-picker.js";import"./emoji/emoji.js";import"./export-docs/export-docs.js";import"./finder/finder.js";import"./google-maps/google-maps.js";import"./google-search/google-search.js";import"./highlight-signature/highlight-signature.js";import"./iframe-editor/iframe-editor.js";import"./keyboard/keyboard.js";import"./mobile-view/mobile-view.js";import"./page-break/page-break.js";import"./paste-code/paste-code.js";import"./show-blocks/show-blocks.js";import"./style/style.js";import"./templates/templates.js";import"./todo-list/todo-list.js";import"./translate/translate.js";import"./tune-block/tune-block.js";
@@ -3,29 +3,5 @@
3
3
  * See LICENSE.md in the project root for license information.
4
4
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
5
5
  */
6
- import type { IJodit } from "jodit/esm/types/index";
7
- import "./config";
8
- import { Plugin } from "jodit/esm/core/plugin/index";
9
- import type { AutoCompleteSource, IAutoCompleteCustomFeed, IAutoCompleteItem } from "./interface";
10
- export declare class autocomplete extends Plugin {
11
- /** @override */
12
- static requires: string[];
13
- /** @override */
14
- hasStyle: boolean;
15
- private get list();
16
- private get popup();
17
- private sources;
18
- /** @override */
19
- protected afterInit(jodit: IJodit): void;
20
- private registerAutocompleteSource;
21
- private unregisterAutocompleteSource;
22
- private static isControlKey;
23
- private onKeyDown;
24
- private onKeyControlDown;
25
- private onEnter;
26
- private onAutoComplete;
27
- resolveFeed(query: string, feed: AutoCompleteSource, baseSource?: IAutoCompleteCustomFeed): Promise<IAutoCompleteItem[]>;
28
- private openPopup;
29
- /** @override */
30
- protected beforeDestruct(jodit: IJodit): void;
31
- }
6
+ import "./autocomplete.impl";
7
+ export * from "./autocomplete.impl";
@@ -0,0 +1,31 @@
1
+ /*!
2
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
3
+ * See LICENSE.md in the project root for license information.
4
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
5
+ */
6
+ import type { IJodit } from "jodit/esm/types/index";
7
+ import "./config";
8
+ import { Plugin } from "jodit/esm/core/plugin/index";
9
+ import type { AutoCompleteSource, IAutoCompleteCustomFeed, IAutoCompleteItem } from "./interface";
10
+ export declare class autocomplete extends Plugin {
11
+ /** @override */
12
+ static requires: string[];
13
+ /** @override */
14
+ hasStyle: boolean;
15
+ private get list();
16
+ private get popup();
17
+ private sources;
18
+ /** @override */
19
+ protected afterInit(jodit: IJodit): void;
20
+ private registerAutocompleteSource;
21
+ private unregisterAutocompleteSource;
22
+ private static isControlKey;
23
+ private onKeyDown;
24
+ private onKeyControlDown;
25
+ private onEnter;
26
+ private onAutoComplete;
27
+ resolveFeed(query: string, feed: AutoCompleteSource, baseSource?: IAutoCompleteCustomFeed): Promise<IAutoCompleteItem[]>;
28
+ private openPopup;
29
+ /** @override */
30
+ protected beforeDestruct(jodit: IJodit): void;
31
+ }
@@ -0,0 +1 @@
1
+ var R=Object.defineProperty;var m=(c,e)=>R(c,"name",{value:e,configurable:!0});var p=function(c,e,t,o){var r=arguments.length,s=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,o);else for(var i=c.length-1;i>=0;i--)(n=c[i])&&(s=(r<3?n(s):r>3?n(e,t,s):n(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s};import"./config.js";import{Autocomplete as D}from"./ui/autocomplete.js";import{getTextLeftOfCursor as E,replaceTextLeftOfCursorAfterSpace as P}from"./helpers.js";import{KEY_DOWN as d,KEY_ENTER as O,KEY_ESC as b,KEY_TAB as y,KEY_UP as g}from"jodit/esm/core/constants.js";import{autobind as u,cache as v,debounce as _}from"jodit/esm/core/decorators/index.js";import{Dom as x}from"jodit/esm/core/dom/dom.js";import{isArray as w,isFunction as A,isPromise as M,isString as C,position as S,trim as V}from"jodit/esm/core/helpers/index.js";import{Plugin as F}from"jodit/esm/core/plugin/index.js";import{Popup as T}from"jodit/esm/core/ui/popup/popup.js";import{JoditPro as j}from"../../jodit-pro.js";const a=class a extends F{constructor(){super(...arguments),this.hasStyle=!j.fatMode,this.sources=[]}get list(){const e=new D(this.jodit);return e.setDisplayMode(this.jodit.o.autocomplete.displayMode),e}get popup(){const e=new T(this.jodit);return e.setMod("padding",!1),e.setContent(this.list.container),this.jodit.o.autocomplete.displayMode==="inline"&&e.setMod("autocomplete-inline",!0),this.jodit.e.on(e,"beforeClose",()=>{this.list.currentSelection=0}),e}afterInit(e){e.e.on("select.autocomplete",t=>{let o=t.value;A(t.insertValueRenderer)&&(o=t.insertValueRenderer(t)),x.isNode(o)||(o=e.createInside.fromHTML(o)),P(e.s.range,o),this.j.s.setCursorAfter(o),this.j.synchronizeValues(),this.popup.close()}).on("keydown.autocomplete",this.onKeyDown).on("keydown.autocomplete",this.onKeyControlDown,{top:!0}).on("beforeEnter.autocomplete",this.onEnter,{top:!0}).on("autocomplete.autocomplete",this.onAutoComplete).on("registerAutocompleteSource.autocomplete",this.registerAutocompleteSource).on("unregisterAutocompleteSource.autocomplete",this.unregisterAutocompleteSource)}registerAutocompleteSource(e){this.sources.push(e)}unregisterAutocompleteSource(e){const t=this.sources.indexOf(e);t!==-1&&this.sources.splice(t,1)}static isControlKey(e){return e===d||e===g||e===O||e===y}async onKeyDown(e){var t,o;if(e.key===b){this.popup.isOpened&&this.popup.close();return}const{s:r}=this.j;if(a.isControlKey(e.key)||!r.isInsideArea||!r.isCollapsed)return;const s=!((t=this.j.s.sel)===null||t===void 0)&&t.rangeCount?(o=this.j.s.sel)===null||o===void 0?void 0:o.getRangeAt(0):null,n=s&&E(s).split(" ").pop();if(n&&V(n).length){const i=await this.onAutoComplete(n);if(i.length)return this.openPopup(i)}this.popup.isOpened&&this.popup.close()}onKeyControlDown(e){if(this.popup.isOpened&&a.isControlKey(e.key)){switch(e.key){case d:this.list.selectNext();break;case g:this.list.selectPrevious();break;case y:this.list.select();break}return this.j.e.stopPropagation(e.type),!1}}onEnter(){if(this.popup.isOpened)return this.list.select(),!1}async onAutoComplete(e){const t=[];return await Promise.all(this.sources.concat(this.j.o.autocomplete.sources).map(async o=>{t.push(...await this.resolveFeed(e,o))})),t}async resolveFeed(e,t,o){let r;if(M(t)&&(t=await t),A(t))r=await t(e);else if(w(t)){const s=t,{isMatchedQuery:n}=this.j.o.autocomplete;r=s.filter(i=>C(i)?n(e,i):n(e,i.value)).map(i=>C(i)?{title:i,value:i}:i)}else r=await this.resolveFeed(e,t.feed,t);if(this.j.isDestructed)return[];if(r&&w(r)){const{itemRenderer:s,insertValueRenderer:n,maxItems:i}=this.j.o.autocomplete;return r=r.map(K=>{var h,f;return{itemRenderer:(h=o?.itemRenderer)!==null&&h!==void 0?h:s,insertValueRenderer:(f=o?.insertValueRenderer)!==null&&f!==void 0?f:n,...K}}),r.slice(0,i)}return[]}openPopup(e){this.list.build(e),this.popup.open(()=>{const{j:t}=this,o=t.s.range.getBoundingClientRect(),r={left:o.left,top:o.top,height:o.height,width:o.width};if(t.o.iframe&&t.iframe){const s=S(t.iframe,t);r.top+=s.top,r.left+=s.left}return r})}beforeDestruct(e){e.e.off(this.list).off(this.popup).off("keydown.autocomplete",this.onKeyDown).off("autocomplete.autocomplete",this.onAutoComplete).off(".autocomplete"),this.list.destruct(),this.popup.destruct()}};m(a,"autocomplete");let l=a;l.requires=["enter","license"],p([v],l.prototype,"list",null),p([v],l.prototype,"popup",null),p([u],l.prototype,"registerAutocompleteSource",null),p([u],l.prototype,"unregisterAutocompleteSource",null),p([_()],l.prototype,"onKeyDown",null),p([u],l.prototype,"onKeyControlDown",null),p([u],l.prototype,"onEnter",null),p([u],l.prototype,"onAutoComplete",null),p([u],l.prototype,"resolveFeed",null),j.plugins.add("autocomplete",l);export{l as autocomplete};
@@ -1 +1 @@
1
- var R=Object.defineProperty;var m=(c,e)=>R(c,"name",{value:e,configurable:!0});var p=function(c,e,t,o){var r=arguments.length,s=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,o);else for(var i=c.length-1;i>=0;i--)(n=c[i])&&(s=(r<3?n(s):r>3?n(e,t,s):n(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s};import"./config.js";import{Autocomplete as D}from"./ui/autocomplete.js";import{getTextLeftOfCursor as E,replaceTextLeftOfCursorAfterSpace as P}from"./helpers.js";import{KEY_DOWN as d,KEY_ENTER as O,KEY_ESC as b,KEY_TAB as y,KEY_UP as g}from"jodit/esm/core/constants.js";import{autobind as u,cache as v,debounce as _}from"jodit/esm/core/decorators/index.js";import{Dom as x}from"jodit/esm/core/dom/dom.js";import{isArray as w,isFunction as A,isPromise as M,isString as C,position as S,trim as V}from"jodit/esm/core/helpers/index.js";import{Plugin as F}from"jodit/esm/core/plugin/index.js";import{Popup as T}from"jodit/esm/core/ui/popup/popup.js";import{JoditPro as j}from"../../jodit-pro.js";const a=class a extends F{constructor(){super(...arguments),this.hasStyle=!j.fatMode,this.sources=[]}get list(){const e=new D(this.jodit);return e.setDisplayMode(this.jodit.o.autocomplete.displayMode),e}get popup(){const e=new T(this.jodit);return e.setMod("padding",!1),e.setContent(this.list.container),this.jodit.o.autocomplete.displayMode==="inline"&&e.setMod("autocomplete-inline",!0),this.jodit.e.on(e,"beforeClose",()=>{this.list.currentSelection=0}),e}afterInit(e){e.e.on("select.autocomplete",t=>{let o=t.value;A(t.insertValueRenderer)&&(o=t.insertValueRenderer(t)),x.isNode(o)||(o=e.createInside.fromHTML(o)),P(e.s.range,o),this.j.s.setCursorAfter(o),this.j.synchronizeValues(),this.popup.close()}).on("keydown.autocomplete",this.onKeyDown).on("keydown.autocomplete",this.onKeyControlDown,{top:!0}).on("beforeEnter.autocomplete",this.onEnter,{top:!0}).on("autocomplete.autocomplete",this.onAutoComplete).on("registerAutocompleteSource.autocomplete",this.registerAutocompleteSource).on("unregisterAutocompleteSource.autocomplete",this.unregisterAutocompleteSource)}registerAutocompleteSource(e){this.sources.push(e)}unregisterAutocompleteSource(e){const t=this.sources.indexOf(e);t!==-1&&this.sources.splice(t,1)}static isControlKey(e){return e===d||e===g||e===O||e===y}async onKeyDown(e){var t,o;if(e.key===b){this.popup.isOpened&&this.popup.close();return}const{s:r}=this.j;if(a.isControlKey(e.key)||!r.isInsideArea||!r.isCollapsed)return;const s=!((t=this.j.s.sel)===null||t===void 0)&&t.rangeCount?(o=this.j.s.sel)===null||o===void 0?void 0:o.getRangeAt(0):null,n=s&&E(s).split(" ").pop();if(n&&V(n).length){const i=await this.onAutoComplete(n);if(i.length)return this.openPopup(i)}this.popup.isOpened&&this.popup.close()}onKeyControlDown(e){if(this.popup.isOpened&&a.isControlKey(e.key)){switch(e.key){case d:this.list.selectNext();break;case g:this.list.selectPrevious();break;case y:this.list.select();break}return this.j.e.stopPropagation(e.type),!1}}onEnter(){if(this.popup.isOpened)return this.list.select(),!1}async onAutoComplete(e){const t=[];return await Promise.all(this.sources.concat(this.j.o.autocomplete.sources).map(async o=>{t.push(...await this.resolveFeed(e,o))})),t}async resolveFeed(e,t,o){let r;if(M(t)&&(t=await t),A(t))r=await t(e);else if(w(t)){const s=t,{isMatchedQuery:n}=this.j.o.autocomplete;r=s.filter(i=>C(i)?n(e,i):n(e,i.value)).map(i=>C(i)?{title:i,value:i}:i)}else r=await this.resolveFeed(e,t.feed,t);if(this.j.isDestructed)return[];if(r&&w(r)){const{itemRenderer:s,insertValueRenderer:n,maxItems:i}=this.j.o.autocomplete;return r=r.map(K=>{var h,f;return{itemRenderer:(h=o?.itemRenderer)!==null&&h!==void 0?h:s,insertValueRenderer:(f=o?.insertValueRenderer)!==null&&f!==void 0?f:n,...K}}),r.slice(0,i)}return[]}openPopup(e){this.list.build(e),this.popup.open(()=>{const{j:t}=this,o=t.s.range.getBoundingClientRect(),r={left:o.left,top:o.top,height:o.height,width:o.width};if(t.o.iframe&&t.iframe){const s=S(t.iframe,t);r.top+=s.top,r.left+=s.left}return r})}beforeDestruct(e){e.e.off(this.list).off(this.popup).off("keydown.autocomplete",this.onKeyDown).off("autocomplete.autocomplete",this.onAutoComplete).off(".autocomplete"),this.list.destruct(),this.popup.destruct()}};m(a,"autocomplete");let l=a;l.requires=["enter","license"],p([v],l.prototype,"list",null),p([v],l.prototype,"popup",null),p([u],l.prototype,"registerAutocompleteSource",null),p([u],l.prototype,"unregisterAutocompleteSource",null),p([_()],l.prototype,"onKeyDown",null),p([u],l.prototype,"onKeyControlDown",null),p([u],l.prototype,"onEnter",null),p([u],l.prototype,"onAutoComplete",null),p([u],l.prototype,"resolveFeed",null),j.plugins.add("autocomplete",l);export{l as autocomplete};
1
+ import"./autocomplete.impl.js";export*from"./autocomplete.impl.js";
@@ -6,5 +6,5 @@
6
6
  import "jodit/esm/plugins/all";
7
7
  import "./paste-from-word/paste-from-word";
8
8
  import "./license/license";
9
- import "./autocomplete/autocomplete";
9
+ import "./autocomplete/autocomplete.impl";
10
10
  import "jodit/esm/plugins/speech-recognize/speech-recognize";
@@ -1 +1 @@
1
- import"./paste-from-word/paste-from-word.js";import"./license/license.js";import"./autocomplete/autocomplete.js";
1
+ import"./paste-from-word/paste-from-word.js";import"./license/license.js";
@@ -1 +1 @@
1
- var g=Object.defineProperty;var c=(i,e)=>g(i,"name",{value:e,configurable:!0});var u=function(i,e,t,r){var n=arguments.length,a=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(i,e,t,r);else for(var l=i.length-1;l>=0;l--)(s=i[l])&&(a=(n<3?s(a):n>3?s(e,t,a):s(e,t))||a);return n>3&&a&&Object.defineProperty(e,t,a),a};import"./config.js";import{debounce as h,watch as d}from"jodit/esm/core/decorators/index.js";import{Dom as p}from"jodit/esm/core/dom/index.js";import{$$ as b,attr as m}from"jodit/esm/core/helpers/index.js";import{Plugin as k}from"jodit/esm/core/plugin/index.js";import{JoditPro as P}from"../../jodit-pro.js";const f=class f extends k{constructor(){super(...arguments),this.styles=styles,this.buttons=[{name:"pageBreak",group:"insert"}]}className(){return"PageBreak"}afterInit(e){e.registerCommand("insertPageBreak",()=>{const t=e.createInside.div("",{});this.decoratePageBreak(t),e.s.insertNode(t,!1,!1);let r=t.parentNode;for(;r&&r!==e.editor&&(p.after(r,t),!p.isBlock(r));)r=t.parentNode;e.s.setCursorAfter(t),e.setEditorValue()})}decoratePageBreak(e){m(e,{"data-jodit-page-break":!0,contenteditable:!1}),e.innerText=this.j.i18n("Page break")}beforeDestruct(){}onChange(){b('[style*="page-break-after"],[style*="page-break-before"]',this.j.editor).forEach(e=>{p.isEmpty(e)&&!m(e,"data-jodit-page-break")&&this.decoratePageBreak(e)})}onAfterGetValueFromEditor(e){e.value=e.value.replace(/<div[^>]+data-jodit-page-break[^>]+>[^]*?<\/div>/gi,this.j.o.pageBreak.separator)}};c(f,"PageBreak");let o=f;o.requires=["license"],u([d([":change",":afterSetMode"]),h()],o.prototype,"onChange",null),u([d(":afterGetValueFromEditor")],o.prototype,"onAfterGetValueFromEditor",null),P.plugins.add("pageBreak",o);export{o as PageBreak};
1
+ var m=Object.defineProperty;var c=(i,e)=>m(i,"name",{value:e,configurable:!0});var d=function(i,e,t,o){var r=arguments.length,a=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(i,e,t,o);else for(var p=i.length-1;p>=0;p--)(s=i[p])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a};import"./config.js";import{debounce as h,watch as u}from"jodit/esm/core/decorators/index.js";import{Dom as l}from"jodit/esm/core/dom/index.js";import{$$ as b,attr as g}from"jodit/esm/core/helpers/index.js";import{Plugin as k}from"jodit/esm/core/plugin/index.js";import{JoditPro as P}from"../../jodit-pro.js";const f=class f extends k{constructor(){super(...arguments),this.styles=styles,this.buttons=[{name:"pageBreak",group:"insert"}]}className(){return"PageBreak"}afterInit(e){this.onChange(),e.registerCommand("insertPageBreak",()=>{const t=e.createInside.div("",{});this.decoratePageBreak(t),e.s.insertNode(t,!1,!1);const o=new Set(["td","th","tr","tbody","thead","tfoot","caption","colgroup","table"]);let r=t.parentNode;for(;r&&r!==e.editor&&(l.after(r,t),!(l.isBlock(r)&&!l.isTag(r,o)));)r=t.parentNode;e.s.setCursorAfter(t),e.setEditorValue()})}decoratePageBreak(e){g(e,{"data-jodit-page-break":!0,contenteditable:!1}),e.innerText=this.j.i18n("Page break")}beforeDestruct(){}onChange(){b('[style*="page-break-after"],[style*="page-break-before"]',this.j.editor).forEach(e=>{l.isEmpty(e)&&!g(e,"data-jodit-page-break")&&this.decoratePageBreak(e)})}onAfterGetValueFromEditor(e){e.value=e.value.replace(/<div[^>]+data-jodit-page-break[^>]+>[^]*?<\/div>/gi,this.j.o.pageBreak.separator)}};c(f,"PageBreak");let n=f;n.requires=["license"],d([u([":change",":afterSetMode"]),h()],n.prototype,"onChange",null),d([u(":afterGetValueFromEditor")],n.prototype,"onAfterGetValueFromEditor",null),P.plugins.add("pageBreak",n);export{n as PageBreak};
@@ -3,7 +3,7 @@
3
3
  * See LICENSE.md in the project root for license information.
4
4
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
5
5
  */
6
- import type { CanPromise, IJodit, IUIOption } from "jodit/esm/types/index";
6
+ import type { CanPromise, IControlType, IJodit, IUIOption } from "jodit/esm/types/index";
7
7
  declare global {
8
8
  const Prism: {
9
9
  languages: {
@@ -29,6 +29,11 @@ declare module 'jodit/esm/config' {
29
29
  defaultLanguage: string;
30
30
  languages: IUIOption[];
31
31
  insertTemplate: (jodit: IJodit, language: string, value: string) => string;
32
+ /**
33
+ * Buttons of the contextual popup shown for an existing code block,
34
+ * after the language dropdown. Use control names or inline controls.
35
+ */
36
+ popup: Array<IControlType | string>;
32
37
  dialog: {
33
38
  width: number;
34
39
  height: number;
@@ -1 +1 @@
1
- var r=Object.defineProperty;var a=(t,e)=>r(t,"name",{value:e,configurable:!0});import o from"./icon.svg.js";import{Config as s}from"jodit/esm/config.js";import{htmlspecialchars as l}from"jodit/esm/core/helpers/html/htmlspecialchars.js";s.prototype.controls.pasteCode={icon:o,tooltip:"Paste code",command:"pasteCode"},s.prototype.pasteCode={globalHighlightLib:!1,canonicalLanguageCode(t){switch(t){case"ts":return"typescript";case"js":return"javascript";case"markup":return"html"}return t},highlightLib:{beforeLibLoad(){window.Prism=window.Prism||{},window.Prism.manual=!0},highlight(t,e){return typeof Prism<"u"?Prism.highlight(t,Prism.languages[e]||Prism.languages.plain,e):l(t)},isLangLoaded(t){return t==="html"?!0:typeof Prism<"u"?!!Prism.languages[t]:!1},js:["https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js","https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"],langUrl:a(t=>`https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-${t}.min.js`,"langUrl"),css:["https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css"]},defaultLanguage:"html",insertTemplate:a((t,e,i)=>`<pre class="language-${e}">${l(i)}</pre>`,"insertTemplate"),languages:[{value:"plaintext",text:"Plain"},{value:"html",text:"HTML/XML"},{value:"bash",text:"Bash"},{value:"php",text:"PHP"},{value:"javascript",text:"JavaScript"},{value:"typescript",text:"TypeScript"},{value:"jsx",text:"JSX"},{value:"java",text:"Java"},{value:"css",text:"CSS"},{value:"php",text:"PHP"},{value:"ruby",text:"Ruby"},{value:"python",text:"Python"},{value:"java",text:"Java"},{value:"c",text:"C"},{value:"csharp",text:"C#"},{value:"cpp",text:"C++"},{value:"sql",text:"SQL"},{value:"docker",text:"Docker"},{value:"http",text:"HTTP"},{value:"ini",text:"INI"},{value:"yaml",text:"YAML"},{value:"json",text:"JSON"},{value:"json5",text:"JSON5"},{value:"makefile",text:"Makefile"},{value:"swift",text:"Swift"}],dialog:{width:700,height:600}};
1
+ var r=Object.defineProperty;var a=(e,t)=>r(e,"name",{value:t,configurable:!0});import{copyCodeToClipboard as p}from"./helpers.js";import c from"./icon.svg.js";import{Config as o}from"jodit/esm/config.js";import{Dom as i}from"jodit/esm/core/dom/index.js";import{htmlspecialchars as l}from"jodit/esm/core/helpers/html/htmlspecialchars.js";o.prototype.controls.pasteCode={icon:c,tooltip:"Paste code",command:"pasteCode"},o.prototype.controls.codeBlock={edit:{icon:"pencil",tooltip:"Edit code",exec:a((e,t)=>{e.e.fire("editPreInPasteCode",t)},"exec")},copy:{icon:"copy",tooltip:"Copy code",exec:a((e,t)=>{i.isTag(t,"pre")&&p(e,t)},"exec")},remove:{icon:"bin",tooltip:"Delete",exec:a((e,t)=>{i.safeRemove(t),e.e.fire("synchro"),e.e.fire("hideCodeTuner.pasteCode")},"exec")}},o.prototype.pasteCode={globalHighlightLib:!1,canonicalLanguageCode(e){switch(e){case"ts":return"typescript";case"js":return"javascript";case"markup":return"html"}return e},highlightLib:{beforeLibLoad(){window.Prism=window.Prism||{},window.Prism.manual=!0},highlight(e,t){return typeof Prism<"u"?Prism.highlight(e,Prism.languages[t]||Prism.languages.plain,t):l(e)},isLangLoaded(e){return e==="html"?!0:typeof Prism<"u"?!!Prism.languages[e]:!1},js:["https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js","https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"],langUrl:a(e=>`https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-${e}.min.js`,"langUrl"),css:["https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css"]},defaultLanguage:"html",insertTemplate:a((e,t,s)=>`<pre class="language-${t}">${l(s)}</pre>`,"insertTemplate"),popup:["codeBlock.edit","codeBlock.copy","|","codeBlock.remove"],languages:[{value:"plaintext",text:"Plain"},{value:"html",text:"HTML/XML"},{value:"bash",text:"Bash"},{value:"php",text:"PHP"},{value:"javascript",text:"JavaScript"},{value:"typescript",text:"TypeScript"},{value:"jsx",text:"JSX"},{value:"java",text:"Java"},{value:"css",text:"CSS"},{value:"php",text:"PHP"},{value:"ruby",text:"Ruby"},{value:"python",text:"Python"},{value:"java",text:"Java"},{value:"c",text:"C"},{value:"csharp",text:"C#"},{value:"cpp",text:"C++"},{value:"sql",text:"SQL"},{value:"docker",text:"Docker"},{value:"http",text:"HTTP"},{value:"ini",text:"INI"},{value:"yaml",text:"YAML"},{value:"json",text:"JSON"},{value:"json5",text:"JSON5"},{value:"makefile",text:"Makefile"},{value:"swift",text:"Swift"}],dialog:{width:700,height:600}};
@@ -0,0 +1,25 @@
1
+ /*!
2
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
3
+ * See LICENSE.md in the project root for license information.
4
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
5
+ */
6
+ import type { IJodit } from "jodit/esm/types/index";
7
+ /**
8
+ * Reads the canonical language code of a `<pre>` block from its `language-*`
9
+ * class (checked on the pre and on the inner `<code>` element).
10
+ */
11
+ export declare function parseLanguage(jodit: IJodit, pre: HTMLElement): string;
12
+ /**
13
+ * Human readable title of a language code, taken from `pasteCode.languages`.
14
+ */
15
+ export declare function languageTitle(jodit: IJodit, lang: string): string;
16
+ /**
17
+ * Replaces the `language-*` class on a `<pre>` block (and its inner `<code>`)
18
+ * and asks the paste-code plugin to re-highlight it.
19
+ */
20
+ export declare function setPreLanguage(jodit: IJodit, pre: HTMLElement, lang: string): void;
21
+ /**
22
+ * Copies the raw text of a code block to the clipboard and fires
23
+ * `afterCopyCode.pasteCode` with the copied text.
24
+ */
25
+ export declare function copyCodeToClipboard(jodit: IJodit, pre: HTMLElement): void;
@@ -0,0 +1 @@
1
+ var g=Object.defineProperty;var i=(e,t)=>g(e,"name",{value:t,configurable:!0});import{Dom as r}from"jodit/esm/core/dom/index.js";function f(e){return e.firstElementChild===e.lastElementChild&&r.isTag(e.firstElementChild,"code")?e.firstElementChild:e}i(f,"codeContainer");function C(e,t){let n=null;const o=i(c=>c.classList.forEach(s=>{const l=/^language-(.+)/.exec(s);l&&l[1]&&(n=l[1])}),"getLang");o(t);const a=f(t);return n==null&&a!==t&&o(a),e.o.pasteCode.canonicalLanguageCode(n||"html")}i(C,"parseLanguage");function h(e,t){const n=e.o.pasteCode.languages.find(o=>String(o.value)===t);return e.i18n(String(n?n.text:t))}i(h,"languageTitle");function m(e,t,n){const o=i(c=>Array.from(c.classList).forEach(s=>{/^language-/.test(s)&&c.classList.remove(s)}),"strip");o(t);const a=f(t);a!==t&&o(a),a.classList.add(`language-${n}`),e.e.fire("rehighlightPasteCode",t),e.e.fire("synchro")}i(m,"setPreLanguage");function x(e,t){const n=t.innerText,{navigator:o}=e.ow;if(o&&o.clipboard&&o.clipboard.writeText)o.clipboard.writeText(n).catch(()=>null);else{const a=e.create.element("textarea");a.value=n,a.style.position="fixed",a.style.opacity="0",e.od.body.appendChild(a),a.select();try{e.od.execCommand("copy")}catch{}r.safeRemove(a)}e.e.fire("afterCopyCode.pasteCode",n)}i(x,"copyCodeToClipboard");export{x as copyCodeToClipboard,h as languageTitle,C as parseLanguage,m as setPreLanguage};