jodit-pro 4.12.27 → 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 +13 -11
  4. package/es2015/jodit.js +231 -74
  5. package/es2015/jodit.min.js +8 -8
  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 +13 -11
  74. package/es2018/jodit.min.js +8 -8
  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 +14 -12
  104. package/es2021/jodit.js +231 -74
  105. package/es2021/jodit.min.js +9 -9
  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 +28 -26
  175. package/es2021.en/jodit.js +231 -74
  176. package/es2021.en/jodit.min.js +9 -9
  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 +333 -74
  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
@@ -12,11 +12,20 @@ export declare class pasteCode extends Plugin {
12
12
  static requires: string[];
13
13
  /** @override */
14
14
  buttons: IPlugin['buttons'];
15
+ /**
16
+ * Contextual UI (drag anchor + popup toolbar) for existing code blocks
17
+ */
18
+ private __codeTuner;
15
19
  /** @override */
16
20
  protected afterInit(jodit: IJodit): void;
17
21
  private __openCodeEditDialog;
18
22
  /** @override */
19
23
  protected beforeDestruct(jodit: IJodit): void;
24
+ /**
25
+ * Re-highlights a code block, e.g. after its language was changed from the
26
+ * contextual popup.
27
+ */
28
+ protected onRehighlightPasteCode(pre: HTMLElement): void;
20
29
  private __createForm;
21
30
  private __createDialog;
22
31
  protected __onChange(): void;
@@ -1 +1 @@
1
- var j=Object.defineProperty;var u=(d,e)=>j(d,"name",{value:e,configurable:!0});var g,_=function(d,e,t,i){var o=arguments.length,a=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(d,e,t,i);else for(var n=d.length-1;n>=0;n--)(s=d[n])&&(a=(o<3?s(a):o>3?s(e,t,a):s(e,t))||a);return o>3&&a&&Object.defineProperty(e,t,a),a};import"./config.js";import{IS_PROD as v}from"jodit/esm/core/constants.js";import{autobind as E,component as I,debounce as w,watch as p}from"jodit/esm/core/decorators/index.js";import{$$ as S,appendScriptAsync as y,attr as m,loadNext as P,loadNextStyle as D,refs as T,stripTags as x}from"jodit/esm/core/helpers/index.js";import{isBoolean as F}from"jodit/esm/core/helpers/checker/is-boolean.js";import{htmlspecialchars as H}from"jodit/esm/core/helpers/html/htmlspecialchars.js";import{Plugin as J}from"jodit/esm/core/plugin/index.js";import{Button as C,UIForm as O,UISelect as A,UITextArea as N}from"jodit/esm/core/ui/index.js";import{Dialog as $,Dom as l}from"jodit/esm/modules/index.js";import{JoditPro as q}from"../../jodit-pro.js";let r=(g=class extends J{constructor(){super(...arguments),this.buttons=[{name:"pasteCode",group:"clipboard"}],this.__highlightLibJSIsLoaded=!1,this.__loadLanguage=new Map,this.__initHighlightLibLoading=async e=>{const{globalHighlightLib:t,highlightLib:{css:i,js:o,langUrl:a,highlight:s,isLangLoaded:n,beforeLibLoad:c,afterLibLoad:h}}=this.j.o.pasteCode;return!this.__highlightLibJSIsLoaded&&!t&&(this.__highlightLibJSIsLoaded=Promise.resolve(c?.()).then(()=>L(this.async,Promise.allSettled([D(this.jodit,i).catch(()=>null),P(this.jodit,o).catch(()=>null)]))).then(()=>h?.())),F(this.__highlightLibJSIsLoaded)||await this.__highlightLibJSIsLoaded,e&&!n(e)&&!t&&(this.__loadLanguage.has(e)||(v||console.log("Load language",e,"for paste-code"),this.__loadLanguage.set(e,L(this.async,y(this.jodit,a(e)).catch(()=>null)))),await this.__loadLanguage.get(e)),{highlight:s}}}className(){return"pasteCode"}afterInit(e){e.registerCommand("pasteCode",()=>this.__openCodeEditDialog()),e.async.requestIdleCallback(()=>this.__initHighlightLibLoading())}__openCodeEditDialog(e,t,i){const o=this.j,a=this.__createForm(),{code:s,language:n}=T(a.container);e&&(n.value=e),t&&(s.value=t),o.async.requestIdleCallback(()=>{s.focus()}),o.s.save(),this.__createDialog(()=>{if(a.validate()){o.s.restore();const h=o.createInside.fromHTML(o.o.pasteCode.insertTemplate(o,n.value,s.value));if(i)l.replace(i,h,o.createInside,!1,!0);else{const b=o.s.current(),f=l.up(b,l.isBlock,o.editor);f&&!l.isCell(f)?l.after(f,h):o.s.insertNode(h)}this.__imdOnChange();return}return!1},()=>{o.s.restore()}).setContent(a.container).open(!0)}beforeDestruct(e){}__createForm(){const{jodit:e}=this;return new O(e,[new A(e,{name:"language",label:"Language",value:e.o.pasteCode.defaultLanguage,options:e.o.pasteCode.languages,required:!0}),new N(e,{label:"Code view",resizable:!1,name:"code",required:!0,className:"jodit-paste-code__textarea"})],{className:"jodit-paste-code"})}__createDialog(e,t){const i=new $({language:this.j.o.language});return i.setHeader("Insert/Edit Code Sample").setSize(this.j.o.pasteCode.dialog.width,this.j.o.pasteCode.dialog.height).setFooter([C(i,"","Cancel","default").onAction(()=>{i.close(),t()}),C(i,"save","Save","primary").onAction(()=>{i.close(),e()})]),i}__onChange(){this.__imdOnChange()}__imdOnChange(){S("pre",this.j.editor).forEach(e=>{m(e,"contenteditable")||(m(e,"contenteditable",!1),this.__highlightCode(e).catch(()=>null))})}async __highlightCode(e){const t=this.__parseLanguage(e),{highlight:i}=await this.__initHighlightLibLoading(t);let o=e;e.firstElementChild===e.lastElementChild&&l.isTag(e.firstElementChild,"code")&&(o=e.firstElementChild),o.innerHTML=i(o.innerText,t)}onPreEdit(e){const t=l.isNode(e)&&l.isTag(e,"pre")?e:l.closest(e.target,"pre",this.j.editor);if(t){const i=this.__parseLanguage(t);this.__openCodeEditDialog(i,t.innerText,t)}}__parseLanguage(e){let t=null;const i=u(o=>o.classList.forEach(a=>{if(/language-/.test(a)){const s=/language-(.*)/.exec(a);s&&s[1]&&(t=s[1])}}),"getLang");return i(e),t==null&&e.firstElementChild===e.lastElementChild&&l.isTag(e.firstElementChild,"code")&&i(e.firstElementChild),this.jodit.o.pasteCode.canonicalLanguageCode(t||"html")}onAfterGetValueFromEditor(e){const t=u((i,o,a,s,n,c)=>`${o.trim()}${s}${H(x(n,this.j.ed,new Set(["br"])))}${c}`,"strip");e.value=e.value.replace(/(<pre[^>]*)contenteditable\s*=\s*(['"]?)false\2([^>]*>\s*<code[^>]*>)(.*?)(<\/code>\s*<\/pre>)/gis,t).replace(/(<pre[^>]*)contenteditable\s*=\s*(['"]?)false\2([^>]*>)(.*?)(<\/pre>)/gis,t)}},u(g,"pasteCode"),g);r.requires=["license"],_([E],r.prototype,"__openCodeEditDialog",null),_([p(["?:change","?:afterInit"]),w()],r.prototype,"__onChange",null),_([p(["?:dblclick","?:editPreInPasteCode"])],r.prototype,"onPreEdit",null),_([p("?:afterGetValueFromEditor")],r.prototype,"onAfterGetValueFromEditor",null),r=_([I],r);function L(d,e){return d.promise((t,i)=>{e.then(t).catch(i)}).catch(()=>null)}u(L,"waitingPromise"),q.plugins.add("paste-code",r);export{r as pasteCode};
1
+ var v=Object.defineProperty;var _=(d,e)=>v(d,"name",{value:e,configurable:!0});var u,g=function(d,e,t,o){var i=arguments.length,a=i<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(d,e,t,o);else for(var n=d.length-1;n>=0;n--)(s=d[n])&&(a=(i<3?s(a):i>3?s(e,t,a):s(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a};import"./config.js";import{UICodeTuner as j}from"./ui/code-tuner/code-tuner.js";import{parseLanguage as I}from"./helpers.js";import{IS_PROD as w}from"jodit/esm/core/constants.js";import{autobind as P,component as E,debounce as y,watch as p}from"jodit/esm/core/decorators/index.js";import{$$ as S,appendScriptAsync as T,attr as m,loadNext as D,loadNextStyle as x,refs as F,stripTags as H}from"jodit/esm/core/helpers/index.js";import{isBoolean as J}from"jodit/esm/core/helpers/checker/is-boolean.js";import{htmlspecialchars as N}from"jodit/esm/core/helpers/html/htmlspecialchars.js";import{Plugin as O}from"jodit/esm/core/plugin/index.js";import{Button as C,UIForm as A,UISelect as R,UITextArea as $}from"jodit/esm/core/ui/index.js";import{Dialog as q,Dom as r}from"jodit/esm/modules/index.js";import{JoditPro as U}from"../../jodit-pro.js";let l=(u=class extends O{constructor(){super(...arguments),this.buttons=[{name:"pasteCode",group:"clipboard"}],this.__highlightLibJSIsLoaded=!1,this.__loadLanguage=new Map,this.__initHighlightLibLoading=async e=>{const{globalHighlightLib:t,highlightLib:{css:o,js:i,langUrl:a,highlight:s,isLangLoaded:n,beforeLibLoad:c,afterLibLoad:h}}=this.j.o.pasteCode;return!this.__highlightLibJSIsLoaded&&!t&&(this.__highlightLibJSIsLoaded=Promise.resolve(c?.()).then(()=>L(this.async,Promise.allSettled([x(this.jodit,o).catch(()=>null),D(this.jodit,i).catch(()=>null)]))).then(()=>h?.())),J(this.__highlightLibJSIsLoaded)||await this.__highlightLibJSIsLoaded,e&&!n(e)&&!t&&(this.__loadLanguage.has(e)||(w||console.log("Load language",e,"for paste-code"),this.__loadLanguage.set(e,L(this.async,T(this.jodit,a(e)).catch(()=>null)))),await this.__loadLanguage.get(e)),{highlight:s}}}className(){return"pasteCode"}afterInit(e){e.registerCommand("pasteCode",()=>this.__openCodeEditDialog()),this.__codeTuner=new j(e),e.async.requestIdleCallback(()=>this.__initHighlightLibLoading())}__openCodeEditDialog(e,t,o){const i=this.j,a=this.__createForm(),{code:s,language:n}=F(a.container);e&&(n.value=e),t&&(s.value=t),i.async.requestIdleCallback(()=>{s.focus()}),i.s.save(),this.__createDialog(()=>{if(a.validate()){i.s.restore();const h=i.createInside.fromHTML(i.o.pasteCode.insertTemplate(i,n.value,s.value));if(o)r.replace(o,h,i.createInside,!1,!0);else{const b=i.s.current(),f=r.up(b,r.isBlock,i.editor);f&&!r.isCell(f)?r.after(f,h):i.s.insertNode(h)}this.__imdOnChange();return}return!1},()=>{i.s.restore()}).setContent(a.container).open(!0)}beforeDestruct(e){var t;(t=this.__codeTuner)===null||t===void 0||t.destruct()}onRehighlightPasteCode(e){r.isTag(e,"pre")&&(m(e,"contenteditable",!1),this.__highlightCode(e).catch(()=>null))}__createForm(){const{jodit:e}=this;return new A(e,[new R(e,{name:"language",label:"Language",value:e.o.pasteCode.defaultLanguage,options:e.o.pasteCode.languages,required:!0}),new $(e,{label:"Code view",resizable:!1,name:"code",required:!0,className:"jodit-paste-code__textarea"})],{className:"jodit-paste-code"})}__createDialog(e,t){const o=new q({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([C(o,"","Cancel","default").onAction(()=>{o.close(),t()}),C(o,"save","Save","primary").onAction(()=>{o.close(),e()})]),o}__onChange(){this.__imdOnChange()}__imdOnChange(){S("pre",this.j.editor).forEach(e=>{m(e,"contenteditable")||(m(e,"contenteditable",!1),this.__highlightCode(e).catch(()=>null))})}async __highlightCode(e){const t=this.__parseLanguage(e),{highlight:o}=await this.__initHighlightLibLoading(t);let i=e;e.firstElementChild===e.lastElementChild&&r.isTag(e.firstElementChild,"code")&&(i=e.firstElementChild),i.innerHTML=o(i.innerText,t)}onPreEdit(e){const t=r.isNode(e)&&r.isTag(e,"pre")?e:r.closest(e.target,"pre",this.j.editor);if(t){const o=this.__parseLanguage(t);this.__openCodeEditDialog(o,t.innerText,t)}}__parseLanguage(e){return I(this.jodit,e)}onAfterGetValueFromEditor(e){const t=_((o,i,a,s,n,c)=>`${i.trim()}${s}${N(H(n,this.j.ed,new Set(["br"])))}${c}`,"strip");e.value=e.value.replace(/(<pre[^>]*)contenteditable\s*=\s*(['"]?)false\2([^>]*>\s*<code[^>]*>)(.*?)(<\/code>\s*<\/pre>)/gis,t).replace(/(<pre[^>]*)contenteditable\s*=\s*(['"]?)false\2([^>]*>)(.*?)(<\/pre>)/gis,t)}},_(u,"pasteCode"),u);l.requires=["license"],g([P],l.prototype,"__openCodeEditDialog",null),g([p("?:rehighlightPasteCode")],l.prototype,"onRehighlightPasteCode",null),g([p(["?:change","?:afterInit"]),y()],l.prototype,"__onChange",null),g([p(["?:dblclick","?:editPreInPasteCode"])],l.prototype,"onPreEdit",null),g([p("?:afterGetValueFromEditor")],l.prototype,"onAfterGetValueFromEditor",null),l=g([E],l);function L(d,e){return d.promise((t,o)=>{e.then(t).catch(o)}).catch(()=>null)}_(L,"waitingPromise"),U.plugins.add("paste-code",l);export{l as pasteCode};
@@ -0,0 +1,87 @@
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 { UIElement } from "jodit/esm/core/ui/index";
8
+ /**
9
+ * Contextual UI for an existing code block:
10
+ * - a drag anchor shown in the left gutter on hover (moves the whole block);
11
+ * - a popup toolbar (language dropdown + edit / copy / delete) on click.
12
+ *
13
+ * The anchor is rendered `position: fixed` and appended to the document body so
14
+ * it can sit outside the code block without being clipped by the editor
15
+ * workplace (which hides horizontal overflow).
16
+ */
17
+ export declare class UICodeTuner extends UIElement<IJodit> {
18
+ private toolbar;
19
+ private popup;
20
+ private isShown;
21
+ private __hideTimer;
22
+ protected currentBlock: HTMLElement;
23
+ className(): string;
24
+ protected render(): string;
25
+ /**
26
+ * Handler: hovering a code block shows the drag anchor next to it.
27
+ */
28
+ protected onEditorMouseMove(e: MouseEvent): void;
29
+ /**
30
+ * Handler: clicking a code block opens its popup toolbar; clicking anywhere
31
+ * else in the editor closes the tuner.
32
+ */
33
+ protected onEditorClick(e: MouseEvent): void;
34
+ /**
35
+ * Shows the anchor for the given code block.
36
+ */
37
+ show(block: HTMLElement): void;
38
+ /**
39
+ * Soft hide — keeps the UI while the popup toolbar is open.
40
+ */
41
+ hide(): void;
42
+ /**
43
+ * Handler: a click outside the editor closes the tuner — unless it landed on
44
+ * the anchor/grip itself (which lives in the document body, so Jodit reports
45
+ * it as an "outside" click).
46
+ */
47
+ protected onOutsideClick(e: MouseEvent): void;
48
+ /**
49
+ * Hard hide — closes the popup and removes the anchor.
50
+ */
51
+ forceHide(): void;
52
+ /**
53
+ * Global pointer tracking: keep the tuner shown while the pointer is within
54
+ * the block + left gutter + grip region (one continuous hot zone, so there
55
+ * is no seam between the block and the anchor), and hide it shortly after
56
+ * the pointer leaves that region.
57
+ */
58
+ private __onPointerMove;
59
+ private __inActiveZone;
60
+ private __scheduleHide;
61
+ private __cancelHide;
62
+ /**
63
+ * Recalculates the anchor and popup position. Bound to everything that can
64
+ * move the code block: editor/page scroll, resize and content changes.
65
+ */
66
+ private __onReposition;
67
+ protected onEditorChange(): void;
68
+ /**
69
+ * Places the anchor in the gutter to the left of the code block.
70
+ */
71
+ private calcPosition;
72
+ /**
73
+ * Builds and shows the popup toolbar below the code block.
74
+ */
75
+ private openToolbar;
76
+ /**
77
+ * The language dropdown control. Its list is built from
78
+ * `pasteCode.languages` so it always reflects the editor configuration.
79
+ */
80
+ private __languageControl;
81
+ /**
82
+ * Handler: start dragging the whole block by its anchor. The actual drag is
83
+ * performed by the base `drag-and-drop-element` plugin.
84
+ */
85
+ protected onAnchorMouseDown(e: MouseEvent): void;
86
+ destruct(): void;
87
+ }
@@ -0,0 +1,3 @@
1
+ var w=Object.defineProperty;var a=(p,t)=>w(p,"name",{value:t,configurable:!0});var l,r=function(p,t,e,i){var o=arguments.length,n=o<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(p,t,e,i);else for(var d=p.length-1;d>=0;d--)(u=p[d])&&(n=(o<3?u(n):o>3?u(t,e,n):u(t,e))||n);return o>3&&n&&Object.defineProperty(t,e,n),n};import{languageTitle as f,parseLanguage as m,setPreLanguage as T}from"../../helpers.js";import{autobind as j,component as H,throttle as g,watch as h}from"jodit/esm/core/decorators/index.js";import{Dom as c}from"jodit/esm/core/dom/index.js";import{css as b,position as _}from"jodit/esm/core/helpers/index.js";import{Popup as k,UIElement as P}from"jodit/esm/core/ui/index.js";import{makeCollection as M}from"jodit/esm/modules/toolbar/factory.js";const C=16,v=6;let s=(l=class extends P{constructor(){super(...arguments),this.toolbar=M(this.j,this),this.popup=new k(this.j,!1),this.isShown=!1,this.__hideTimer=0}className(){return"UICodeTuner"}render(){return`<div>
2
+ <div class="&__anchor" title="~Drag to move the code block~"></div>
3
+ </div>`}onEditorMouseMove(t){const e=c.closest(t.target,"pre",this.j.editor);e&&(this.__cancelHide(),this.show(e))}onEditorClick(t){const e=c.closest(t.target,"pre",this.j.editor);e?(this.__cancelHide(),this.show(e),this.openToolbar()):this.forceHide()}show(t){this.currentBlock=t,this.isShown||(this.isShown=!0,this.container.parentNode==null&&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()}hide(){this.popup.isOpened||this.forceHide()}onOutsideClick(t){t&&c.isOrContains(this.container,t.target)||this.forceHide()}forceHide(){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(),c.safeRemove(this.container))}__onPointerMove(t){!this.isShown||this.popup.isOpened||(this.__inActiveZone(t.clientX,t.clientY)?this.__cancelHide():this.__scheduleHide())}__inActiveZone(t,e){const i=_(this.currentBlock,this.j);return t>=i.left-C-v-6&&t<=i.left+i.width&&e>=i.top-6&&e<=i.top+i.height+6}__scheduleHide(){this.__hideTimer||(this.__hideTimer=this.j.async.setTimeout(()=>{this.__hideTimer=0,this.hide()},150))}__cancelHide(){this.__hideTimer&&(this.j.async.clearTimeout(this.__hideTimer),this.__hideTimer=0)}__onReposition(){if(this.isShown){if(!this.j.editor.contains(this.currentBlock)){this.forceHide();return}this.calcPosition()}}onEditorChange(){this.__onReposition()}calcPosition(){const t=_(this.currentBlock,this.j);b(this.container,{left:Math.round(t.left-C-v),top:Math.round(t.top+4)}),this.popup.isOpened&&this.popup.updatePosition()}openToolbar(){this.toolbar.build([this.__languageControl(),...this.j.o.pasteCode.popup],this.currentBlock),this.popup.setContent(this.toolbar.container),this.popup.isOpened?this.popup.updatePosition():this.popup.open(()=>_(this.currentBlock,this.j))}__languageControl(){const t={};return this.j.o.pasteCode.languages.forEach(e=>{t[String(e.value)]=String(e.text)}),{name:"language",list:t,tooltip:"Language",text:f(this.j,m(this.j,this.currentBlock)),childTemplate:a((e,i,o)=>this.j.i18n(o),"childTemplate"),update:a((e,i)=>{const o=i.target;c.isTag(o,"pre")&&i.setState({text:f(this.j,m(this.j,o)),icon:{name:""}})},"update"),childExec:a((e,i,{control:o})=>{const n=String(o.args&&o.args[0]||"plaintext");c.isTag(i,"pre")&&(T(this.j,i,n),this.j.e.fire("hideCodeTuner.pasteCode"))},"childExec")}}onAnchorMouseDown(t){t.preventDefault(),this.popup.close(),this.j.e.fire("startDragElement",this.currentBlock,t)}destruct(){this.forceHide(),this.popup.destruct(),super.destruct()}},a(l,"UICodeTuner"),l);r([h("j.editor:mousemove"),g(50)],s.prototype,"onEditorMouseMove",null),r([h("j.editor:click")],s.prototype,"onEditorClick",null),r([h(":outsideClick")],s.prototype,"onOutsideClick",null),r([h(":hideCodeTuner.pasteCode")],s.prototype,"forceHide",null),r([j],s.prototype,"__onPointerMove",null),r([j],s.prototype,"__onReposition",null),r([h(":change :resize :afterSetMode"),g(10)],s.prototype,"onEditorChange",null),r([h("anchor:mousedown")],s.prototype,"onAnchorMouseDown",null),s=r([H],s);export{s as UICodeTuner};
@@ -0,0 +1 @@
1
+ var c='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="#5d6b7a"> <circle cx="6" cy="3" r="1.5" /> <circle cx="10" cy="3" r="1.5" /> <circle cx="6" cy="8" r="1.5" /> <circle cx="10" cy="8" r="1.5" /> <circle cx="6" cy="13" r="1.5" /> <circle cx="10" cy="13" r="1.5" /> </svg> ';export{c as default};
@@ -1 +1 @@
1
- var g=Object.defineProperty;var L=(c,e)=>g(c,"name",{value:e,configurable:!0});var i=function(c,e,t,s){var l=arguments.length,r=l<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(c,e,t,s);else for(var _=c.length-1;_>=0;_--)(p=c[_])&&(r=(l<3?p(r):l>3?p(e,t,r):p(e,t))||r);return l>3&&r&&Object.defineProperty(e,t,r),r};import"./config.js";import{NO_EMPTY_TAGS as y}from"jodit/esm/core/constants.js";import{autobind as f,watch as a}from"jodit/esm/core/decorators/index.js";import{Dom as n}from"jodit/esm/core/dom/dom.js";import{$$ as u,attr as C}from"jodit/esm/core/helpers/utils/index.js";import{Plugin as j}from"jodit/esm/core/plugin/index.js";import{CHANGE as b,REPLACE as m,UNWRAP as E,WRAP as I}from"jodit/esm/core/selection/index.js";import{JoditPro as T}from"../../jodit-pro.js";const d=!0,h=class h extends j{constructor(){super(...arguments),this.buttons=[{name:"todoList",group:"list"}],this.__isOwnCommand=!1}afterInit(e){e.registerCommand("todoList",this.onCommand)}onCommand(){try{this.__isOwnCommand=!0,this.jodit.s.commitStyle({element:"ul",attributes:{class:this.j.o.todoList.className},hooks:d?{afterWrapList:this.__afterWrapList,afterToggleAttribute:this.__afterWrapList}:{}})}finally{this.__isOwnCommand=!1}return!1}__prependInputLabel(e){const{jodit:t}=this,{labelClassName:s,inputFactory:l}=this.j.o.todoList;if(e.querySelector("label."+s))return;const r=t.createInside.element("label",{contenteditable:"false",class:s}),p=l(t);r.appendChild(p),n.prepend(e,r)}__afterToggleList(e,t){if(d){if((e===b||e===m)&&this.__isOwnCommand)return this.__appendInputs(t);if(e===E||e===m||e===b)return this.__removeInputs(t)}}__appendInputs(e){e.querySelectorAll("li").forEach(this.__prependInputLabel)}__removeInputs(e){const{labelClassName:t}=this.j.o.todoList;e.querySelectorAll("label."+t).forEach(n.safeRemove)}__beforeToggleOrderedList(e,t,s){var l;if(!d)return;const r="__beforeToggleOrderedList";if(e!==m&&(t.classList.contains(this.j.o.todoList.className)||s.isApplied(t,r))&&(s.element==="ul"||s.element==="ol")&&((l=s.options.attributes)===null||l===void 0?void 0:l.class)!==this.j.o.todoList.className){const p=n.replace(t,s.element,this.jodit.createInside);return s.setApplied(p,r),this.__removeInputs(p),p}}__afterEnter(){u("ul."+this.j.o.todoList.className+" li",this.jodit.editor).forEach(this.__prependInputLabel)}__afterTab(){u("ul:not(."+this.j.o.todoList.className+") > li > label",this.jodit.editor).filter(this.isTodoLeafLabel).forEach(n.safeRemove)}__changeSelection(e){const t=this.j.s.current();this.isTodoLeafLabel(t)&&(e.preventDefault(),e.stopPropagation(),this.j.s.setCursorAfter(t))}__isEmptyListLeaf(e){return n.isEmpty(e,t=>t.nodeName.toLowerCase()==="input"&&this.isTodoLeafLabel(t.parentElement)?!1:y.has(t.tagName.toLowerCase()))}__backSpaceBeforeCases(e,t){if(e){const s=n.findNotEmptySibling(t,!0);this.isTodoLeafLabel(s)&&n.safeRemove(s)}}__isInvisibleForCursor(e){if(this.isTodoLeafLabel(e))return!0}__backSpaceAfterDelete(){const{labelClassName:e}=this.j.o.todoList;u("label."+e,this.jodit.editor).forEach(t=>{t.closest("ul."+this.j.o.todoList.className)?t.previousSibling&&t.parentElement&&n.prepend(t.parentElement,t):n.safeRemove(t)})}__afterWrapList(e,t){e===I&&this.__appendInputs(t)}__onClickInput(e){const t=e.target;t&&n.isTag(t,"input")&&t.type==="checkbox"&&this.isTodoLeafLabel(t.parentElement)&&C(t,"checked",t.checked?"checked":null)}isTodoLeafLabel(e){const{labelClassName:t}=this.j.o.todoList;return n.isHTMLElement(e)&&e.classList.contains(t)}beforeDestruct(e){}};L(h,"TodoList");let o=h;o.requires=["license"],i([f],o.prototype,"onCommand",null),i([f],o.prototype,"__prependInputLabel",null),i([a(":commitStyleAfterToggleList")],o.prototype,"__afterToggleList",null),i([a(":commitStyleBeforeUnwrapList")],o.prototype,"__beforeToggleOrderedList",null),i([a(":afterEnter")],o.prototype,"__afterEnter",null),i([a(":afterTab")],o.prototype,"__afterTab",null),i([a("j.ed:selectionchange"),a(":afterEnter")],o.prototype,"__changeSelection",null),i([a(":enterIsEmptyListLeaf")],o.prototype,"__isEmptyListLeaf",null),i([a(":backSpaceBeforeCases")],o.prototype,"__backSpaceBeforeCases",null),i([a(":backSpaceIsMovedIgnore"),a(":isInvisibleForCursor")],o.prototype,"__isInvisibleForCursor",null),i([a(":backSpaceAfterDelete")],o.prototype,"__backSpaceAfterDelete",null),i([f],o.prototype,"__afterWrapList",null),i([a(":click")],o.prototype,"__onClickInput",null),i([f],o.prototype,"isTodoLeafLabel",null),T.plugins.add("todo-list",o);export{o as TodoList};
1
+ var g=Object.defineProperty;var L=(c,e)=>g(c,"name",{value:e,configurable:!0});var i=function(c,e,t,s){var l=arguments.length,r=l<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(c,e,t,s);else for(var u=c.length-1;u>=0;u--)(p=c[u])&&(r=(l<3?p(r):l>3?p(e,t,r):p(e,t))||r);return l>3&&r&&Object.defineProperty(e,t,r),r};import"./config.js";import{NO_EMPTY_TAGS as C}from"jodit/esm/core/constants.js";import{autobind as f,watch as n}from"jodit/esm/core/decorators/index.js";import{Dom as a}from"jodit/esm/core/dom/dom.js";import{$$ as _,attr as y}from"jodit/esm/core/helpers/utils/index.js";import{Plugin as E}from"jodit/esm/core/plugin/index.js";import{CHANGE as b,REPLACE as m,UNWRAP as j,WRAP as I}from"jodit/esm/core/selection/index.js";import{JoditPro as T}from"../../jodit-pro.js";const d=!0,h=class h extends E{constructor(){super(...arguments),this.buttons=[{name:"todoList",group:"list"}],this.__isOwnCommand=!1}afterInit(e){e.registerCommand("todoList",this.onCommand)}onCommand(){try{this.__isOwnCommand=!0,this.jodit.s.commitStyle({element:"ul",attributes:{class:this.j.o.todoList.className},hooks:d?{afterWrapList:this.__afterWrapList,afterToggleAttribute:this.__afterWrapList}:{}})}finally{this.__isOwnCommand=!1}return!1}__prependInputLabel(e){const{jodit:t}=this,{labelClassName:s,inputFactory:l}=this.j.o.todoList;if(e.querySelector("label."+s))return;e.children.length===1&&a.isTag(e.firstElementChild,"p")&&a.unwrap(e.firstElementChild);const r=t.createInside.element("label",{contenteditable:"false",class:s}),p=l(t);r.appendChild(p),a.prepend(e,r)}__afterToggleList(e,t){if(d){if((e===b||e===m)&&this.__isOwnCommand)return this.__appendInputs(t);if(e===j||e===m||e===b)return this.__removeInputs(t)}}__appendInputs(e){e.querySelectorAll("li").forEach(this.__prependInputLabel)}__removeInputs(e){const{labelClassName:t}=this.j.o.todoList;e.querySelectorAll("label."+t).forEach(a.safeRemove)}__beforeToggleOrderedList(e,t,s){var l;if(!d)return;const r="__beforeToggleOrderedList";if(e!==m&&(t.classList.contains(this.j.o.todoList.className)||s.isApplied(t,r))&&(s.element==="ul"||s.element==="ol")&&((l=s.options.attributes)===null||l===void 0?void 0:l.class)!==this.j.o.todoList.className){const p=a.replace(t,s.element,this.jodit.createInside);return s.setApplied(p,r),this.__removeInputs(p),p}}__afterEnter(){_("ul."+this.j.o.todoList.className+" li",this.jodit.editor).forEach(this.__prependInputLabel)}__afterTab(){_("ul:not(."+this.j.o.todoList.className+") > li > label",this.jodit.editor).filter(this.isTodoLeafLabel).forEach(a.safeRemove)}__changeSelection(e){const t=this.j.s.current();this.isTodoLeafLabel(t)&&(e.preventDefault(),e.stopPropagation(),this.j.s.setCursorAfter(t))}__isEmptyListLeaf(e){return a.isEmpty(e,t=>t.nodeName.toLowerCase()==="input"&&this.isTodoLeafLabel(t.parentElement)?!1:C.has(t.tagName.toLowerCase()))}__backSpaceBeforeCases(e,t){if(e){const s=a.findNotEmptySibling(t,!0);this.isTodoLeafLabel(s)&&a.safeRemove(s)}}__isInvisibleForCursor(e){if(this.isTodoLeafLabel(e))return!0}__backSpaceAfterDelete(){const{labelClassName:e}=this.j.o.todoList;_("label."+e,this.jodit.editor).forEach(t=>{t.closest("ul."+this.j.o.todoList.className)?t.previousSibling&&t.parentElement&&a.prepend(t.parentElement,t):a.safeRemove(t)})}__afterWrapList(e,t){e===I&&this.__appendInputs(t)}__onClickInput(e){const t=e.target;t&&a.isTag(t,"input")&&t.type==="checkbox"&&this.isTodoLeafLabel(t.parentElement)&&y(t,"checked",t.checked?"checked":null)}isTodoLeafLabel(e){const{labelClassName:t}=this.j.o.todoList;return a.isHTMLElement(e)&&e.classList.contains(t)}beforeDestruct(e){}};L(h,"TodoList");let o=h;o.requires=["license"],i([f],o.prototype,"onCommand",null),i([f],o.prototype,"__prependInputLabel",null),i([n(":commitStyleAfterToggleList")],o.prototype,"__afterToggleList",null),i([n(":commitStyleBeforeUnwrapList")],o.prototype,"__beforeToggleOrderedList",null),i([n(":afterEnter")],o.prototype,"__afterEnter",null),i([n(":afterTab")],o.prototype,"__afterTab",null),i([n("j.ed:selectionchange"),n(":afterEnter")],o.prototype,"__changeSelection",null),i([n(":enterIsEmptyListLeaf")],o.prototype,"__isEmptyListLeaf",null),i([n(":backSpaceBeforeCases")],o.prototype,"__backSpaceBeforeCases",null),i([n(":backSpaceIsMovedIgnore"),n(":isInvisibleForCursor")],o.prototype,"__isInvisibleForCursor",null),i([n(":backSpaceAfterDelete")],o.prototype,"__backSpaceAfterDelete",null),i([f],o.prototype,"__afterWrapList",null),i([n(":click")],o.prototype,"__onClickInput",null),i([f],o.prototype,"isTodoLeafLabel",null),T.plugins.add("todo-list",o);export{o as TodoList};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jodit-pro",
3
- "version": "4.12.27",
3
+ "version": "4.12.32",
4
4
  "author": "Chupurnov Valerii <chupurnov@gmail.com>",
5
5
  "homepage": "https://xdsoft.net/jodit/pro/",
6
6
  "bugs": {
package/types/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;
@@ -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
+ }
@@ -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";
@@ -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;
@@ -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;
@@ -12,11 +12,20 @@ export declare class pasteCode extends Plugin {
12
12
  static requires: string[];
13
13
  /** @override */
14
14
  buttons: IPlugin['buttons'];
15
+ /**
16
+ * Contextual UI (drag anchor + popup toolbar) for existing code blocks
17
+ */
18
+ private __codeTuner;
15
19
  /** @override */
16
20
  protected afterInit(jodit: IJodit): void;
17
21
  private __openCodeEditDialog;
18
22
  /** @override */
19
23
  protected beforeDestruct(jodit: IJodit): void;
24
+ /**
25
+ * Re-highlights a code block, e.g. after its language was changed from the
26
+ * contextual popup.
27
+ */
28
+ protected onRehighlightPasteCode(pre: HTMLElement): void;
20
29
  private __createForm;
21
30
  private __createDialog;
22
31
  protected __onChange(): void;
@@ -0,0 +1,87 @@
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 { UIElement } from "jodit/esm/core/ui/index";
8
+ /**
9
+ * Contextual UI for an existing code block:
10
+ * - a drag anchor shown in the left gutter on hover (moves the whole block);
11
+ * - a popup toolbar (language dropdown + edit / copy / delete) on click.
12
+ *
13
+ * The anchor is rendered `position: fixed` and appended to the document body so
14
+ * it can sit outside the code block without being clipped by the editor
15
+ * workplace (which hides horizontal overflow).
16
+ */
17
+ export declare class UICodeTuner extends UIElement<IJodit> {
18
+ private toolbar;
19
+ private popup;
20
+ private isShown;
21
+ private __hideTimer;
22
+ protected currentBlock: HTMLElement;
23
+ className(): string;
24
+ protected render(): string;
25
+ /**
26
+ * Handler: hovering a code block shows the drag anchor next to it.
27
+ */
28
+ protected onEditorMouseMove(e: MouseEvent): void;
29
+ /**
30
+ * Handler: clicking a code block opens its popup toolbar; clicking anywhere
31
+ * else in the editor closes the tuner.
32
+ */
33
+ protected onEditorClick(e: MouseEvent): void;
34
+ /**
35
+ * Shows the anchor for the given code block.
36
+ */
37
+ show(block: HTMLElement): void;
38
+ /**
39
+ * Soft hide — keeps the UI while the popup toolbar is open.
40
+ */
41
+ hide(): void;
42
+ /**
43
+ * Handler: a click outside the editor closes the tuner — unless it landed on
44
+ * the anchor/grip itself (which lives in the document body, so Jodit reports
45
+ * it as an "outside" click).
46
+ */
47
+ protected onOutsideClick(e: MouseEvent): void;
48
+ /**
49
+ * Hard hide — closes the popup and removes the anchor.
50
+ */
51
+ forceHide(): void;
52
+ /**
53
+ * Global pointer tracking: keep the tuner shown while the pointer is within
54
+ * the block + left gutter + grip region (one continuous hot zone, so there
55
+ * is no seam between the block and the anchor), and hide it shortly after
56
+ * the pointer leaves that region.
57
+ */
58
+ private __onPointerMove;
59
+ private __inActiveZone;
60
+ private __scheduleHide;
61
+ private __cancelHide;
62
+ /**
63
+ * Recalculates the anchor and popup position. Bound to everything that can
64
+ * move the code block: editor/page scroll, resize and content changes.
65
+ */
66
+ private __onReposition;
67
+ protected onEditorChange(): void;
68
+ /**
69
+ * Places the anchor in the gutter to the left of the code block.
70
+ */
71
+ private calcPosition;
72
+ /**
73
+ * Builds and shows the popup toolbar below the code block.
74
+ */
75
+ private openToolbar;
76
+ /**
77
+ * The language dropdown control. Its list is built from
78
+ * `pasteCode.languages` so it always reflects the editor configuration.
79
+ */
80
+ private __languageControl;
81
+ /**
82
+ * Handler: start dragging the whole block by its anchor. The actual drag is
83
+ * performed by the base `drag-and-drop-element` plugin.
84
+ */
85
+ protected onAnchorMouseDown(e: MouseEvent): void;
86
+ destruct(): void;
87
+ }