@ckeditor/ckeditor5-emoji 0.0.1 → 44.2.0-alpha.0

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 (402) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/LICENSE.md +15 -5
  3. package/README.md +30 -3
  4. package/build/emoji.js +5 -0
  5. package/build/translations/af.js +1 -0
  6. package/build/translations/ar.js +1 -0
  7. package/build/translations/ast.js +1 -0
  8. package/build/translations/az.js +1 -0
  9. package/build/translations/bg.js +1 -0
  10. package/build/translations/bn.js +1 -0
  11. package/build/translations/bs.js +1 -0
  12. package/build/translations/ca.js +1 -0
  13. package/build/translations/cs.js +1 -0
  14. package/build/translations/da.js +1 -0
  15. package/build/translations/de-ch.js +1 -0
  16. package/build/translations/de.js +1 -0
  17. package/build/translations/el.js +1 -0
  18. package/build/translations/en-au.js +1 -0
  19. package/build/translations/en-gb.js +1 -0
  20. package/build/translations/eo.js +1 -0
  21. package/build/translations/es-co.js +1 -0
  22. package/build/translations/es.js +1 -0
  23. package/build/translations/et.js +1 -0
  24. package/build/translations/eu.js +1 -0
  25. package/build/translations/fa.js +1 -0
  26. package/build/translations/fi.js +1 -0
  27. package/build/translations/fr.js +1 -0
  28. package/build/translations/gl.js +1 -0
  29. package/build/translations/gu.js +1 -0
  30. package/build/translations/he.js +1 -0
  31. package/build/translations/hi.js +1 -0
  32. package/build/translations/hr.js +1 -0
  33. package/build/translations/hu.js +1 -0
  34. package/build/translations/hy.js +1 -0
  35. package/build/translations/id.js +1 -0
  36. package/build/translations/it.js +1 -0
  37. package/build/translations/ja.js +1 -0
  38. package/build/translations/jv.js +1 -0
  39. package/build/translations/kk.js +1 -0
  40. package/build/translations/km.js +1 -0
  41. package/build/translations/kn.js +1 -0
  42. package/build/translations/ko.js +1 -0
  43. package/build/translations/ku.js +1 -0
  44. package/build/translations/lt.js +1 -0
  45. package/build/translations/lv.js +1 -0
  46. package/build/translations/ms.js +1 -0
  47. package/build/translations/nb.js +1 -0
  48. package/build/translations/ne.js +1 -0
  49. package/build/translations/nl.js +1 -0
  50. package/build/translations/no.js +1 -0
  51. package/build/translations/oc.js +1 -0
  52. package/build/translations/pl.js +1 -0
  53. package/build/translations/pt-br.js +1 -0
  54. package/build/translations/pt.js +1 -0
  55. package/build/translations/ro.js +1 -0
  56. package/build/translations/ru.js +1 -0
  57. package/build/translations/si.js +1 -0
  58. package/build/translations/sk.js +1 -0
  59. package/build/translations/sl.js +1 -0
  60. package/build/translations/sq.js +1 -0
  61. package/build/translations/sr-latn.js +1 -0
  62. package/build/translations/sr.js +1 -0
  63. package/build/translations/sv.js +1 -0
  64. package/build/translations/th.js +1 -0
  65. package/build/translations/ti.js +1 -0
  66. package/build/translations/tk.js +1 -0
  67. package/build/translations/tr.js +1 -0
  68. package/build/translations/tt.js +1 -0
  69. package/build/translations/ug.js +1 -0
  70. package/build/translations/uk.js +1 -0
  71. package/build/translations/ur.js +1 -0
  72. package/build/translations/uz.js +1 -0
  73. package/build/translations/vi.js +1 -0
  74. package/build/translations/zh-cn.js +1 -0
  75. package/build/translations/zh.js +1 -0
  76. package/ckeditor5-metadata.json +32 -0
  77. package/dist/index-content.css +4 -0
  78. package/dist/index-editor.css +111 -0
  79. package/dist/index.css +143 -0
  80. package/dist/index.css.map +1 -0
  81. package/dist/index.js +1477 -0
  82. package/dist/index.js.map +1 -0
  83. package/dist/translations/af.d.ts +8 -0
  84. package/dist/translations/af.js +5 -0
  85. package/dist/translations/af.umd.js +11 -0
  86. package/dist/translations/ar.d.ts +8 -0
  87. package/dist/translations/ar.js +5 -0
  88. package/dist/translations/ar.umd.js +11 -0
  89. package/dist/translations/ast.d.ts +8 -0
  90. package/dist/translations/ast.js +5 -0
  91. package/dist/translations/ast.umd.js +11 -0
  92. package/dist/translations/az.d.ts +8 -0
  93. package/dist/translations/az.js +5 -0
  94. package/dist/translations/az.umd.js +11 -0
  95. package/dist/translations/bg.d.ts +8 -0
  96. package/dist/translations/bg.js +5 -0
  97. package/dist/translations/bg.umd.js +11 -0
  98. package/dist/translations/bn.d.ts +8 -0
  99. package/dist/translations/bn.js +5 -0
  100. package/dist/translations/bn.umd.js +11 -0
  101. package/dist/translations/bs.d.ts +8 -0
  102. package/dist/translations/bs.js +5 -0
  103. package/dist/translations/bs.umd.js +11 -0
  104. package/dist/translations/ca.d.ts +8 -0
  105. package/dist/translations/ca.js +5 -0
  106. package/dist/translations/ca.umd.js +11 -0
  107. package/dist/translations/cs.d.ts +8 -0
  108. package/dist/translations/cs.js +5 -0
  109. package/dist/translations/cs.umd.js +11 -0
  110. package/dist/translations/da.d.ts +8 -0
  111. package/dist/translations/da.js +5 -0
  112. package/dist/translations/da.umd.js +11 -0
  113. package/dist/translations/de-ch.d.ts +8 -0
  114. package/dist/translations/de-ch.js +5 -0
  115. package/dist/translations/de-ch.umd.js +11 -0
  116. package/dist/translations/de.d.ts +8 -0
  117. package/dist/translations/de.js +5 -0
  118. package/dist/translations/de.umd.js +11 -0
  119. package/dist/translations/el.d.ts +8 -0
  120. package/dist/translations/el.js +5 -0
  121. package/dist/translations/el.umd.js +11 -0
  122. package/dist/translations/en-au.d.ts +8 -0
  123. package/dist/translations/en-au.js +5 -0
  124. package/dist/translations/en-au.umd.js +11 -0
  125. package/dist/translations/en-gb.d.ts +8 -0
  126. package/dist/translations/en-gb.js +5 -0
  127. package/dist/translations/en-gb.umd.js +11 -0
  128. package/dist/translations/en.d.ts +8 -0
  129. package/dist/translations/en.js +5 -0
  130. package/dist/translations/en.umd.js +11 -0
  131. package/dist/translations/eo.d.ts +8 -0
  132. package/dist/translations/eo.js +5 -0
  133. package/dist/translations/eo.umd.js +11 -0
  134. package/dist/translations/es-co.d.ts +8 -0
  135. package/dist/translations/es-co.js +5 -0
  136. package/dist/translations/es-co.umd.js +11 -0
  137. package/dist/translations/es.d.ts +8 -0
  138. package/dist/translations/es.js +5 -0
  139. package/dist/translations/es.umd.js +11 -0
  140. package/dist/translations/et.d.ts +8 -0
  141. package/dist/translations/et.js +5 -0
  142. package/dist/translations/et.umd.js +11 -0
  143. package/dist/translations/eu.d.ts +8 -0
  144. package/dist/translations/eu.js +5 -0
  145. package/dist/translations/eu.umd.js +11 -0
  146. package/dist/translations/fa.d.ts +8 -0
  147. package/dist/translations/fa.js +5 -0
  148. package/dist/translations/fa.umd.js +11 -0
  149. package/dist/translations/fi.d.ts +8 -0
  150. package/dist/translations/fi.js +5 -0
  151. package/dist/translations/fi.umd.js +11 -0
  152. package/dist/translations/fr.d.ts +8 -0
  153. package/dist/translations/fr.js +5 -0
  154. package/dist/translations/fr.umd.js +11 -0
  155. package/dist/translations/gl.d.ts +8 -0
  156. package/dist/translations/gl.js +5 -0
  157. package/dist/translations/gl.umd.js +11 -0
  158. package/dist/translations/gu.d.ts +8 -0
  159. package/dist/translations/gu.js +5 -0
  160. package/dist/translations/gu.umd.js +11 -0
  161. package/dist/translations/he.d.ts +8 -0
  162. package/dist/translations/he.js +5 -0
  163. package/dist/translations/he.umd.js +11 -0
  164. package/dist/translations/hi.d.ts +8 -0
  165. package/dist/translations/hi.js +5 -0
  166. package/dist/translations/hi.umd.js +11 -0
  167. package/dist/translations/hr.d.ts +8 -0
  168. package/dist/translations/hr.js +5 -0
  169. package/dist/translations/hr.umd.js +11 -0
  170. package/dist/translations/hu.d.ts +8 -0
  171. package/dist/translations/hu.js +5 -0
  172. package/dist/translations/hu.umd.js +11 -0
  173. package/dist/translations/hy.d.ts +8 -0
  174. package/dist/translations/hy.js +5 -0
  175. package/dist/translations/hy.umd.js +11 -0
  176. package/dist/translations/id.d.ts +8 -0
  177. package/dist/translations/id.js +5 -0
  178. package/dist/translations/id.umd.js +11 -0
  179. package/dist/translations/it.d.ts +8 -0
  180. package/dist/translations/it.js +5 -0
  181. package/dist/translations/it.umd.js +11 -0
  182. package/dist/translations/ja.d.ts +8 -0
  183. package/dist/translations/ja.js +5 -0
  184. package/dist/translations/ja.umd.js +11 -0
  185. package/dist/translations/jv.d.ts +8 -0
  186. package/dist/translations/jv.js +5 -0
  187. package/dist/translations/jv.umd.js +11 -0
  188. package/dist/translations/kk.d.ts +8 -0
  189. package/dist/translations/kk.js +5 -0
  190. package/dist/translations/kk.umd.js +11 -0
  191. package/dist/translations/km.d.ts +8 -0
  192. package/dist/translations/km.js +5 -0
  193. package/dist/translations/km.umd.js +11 -0
  194. package/dist/translations/kn.d.ts +8 -0
  195. package/dist/translations/kn.js +5 -0
  196. package/dist/translations/kn.umd.js +11 -0
  197. package/dist/translations/ko.d.ts +8 -0
  198. package/dist/translations/ko.js +5 -0
  199. package/dist/translations/ko.umd.js +11 -0
  200. package/dist/translations/ku.d.ts +8 -0
  201. package/dist/translations/ku.js +5 -0
  202. package/dist/translations/ku.umd.js +11 -0
  203. package/dist/translations/lt.d.ts +8 -0
  204. package/dist/translations/lt.js +5 -0
  205. package/dist/translations/lt.umd.js +11 -0
  206. package/dist/translations/lv.d.ts +8 -0
  207. package/dist/translations/lv.js +5 -0
  208. package/dist/translations/lv.umd.js +11 -0
  209. package/dist/translations/ms.d.ts +8 -0
  210. package/dist/translations/ms.js +5 -0
  211. package/dist/translations/ms.umd.js +11 -0
  212. package/dist/translations/nb.d.ts +8 -0
  213. package/dist/translations/nb.js +5 -0
  214. package/dist/translations/nb.umd.js +11 -0
  215. package/dist/translations/ne.d.ts +8 -0
  216. package/dist/translations/ne.js +5 -0
  217. package/dist/translations/ne.umd.js +11 -0
  218. package/dist/translations/nl.d.ts +8 -0
  219. package/dist/translations/nl.js +5 -0
  220. package/dist/translations/nl.umd.js +11 -0
  221. package/dist/translations/no.d.ts +8 -0
  222. package/dist/translations/no.js +5 -0
  223. package/dist/translations/no.umd.js +11 -0
  224. package/dist/translations/oc.d.ts +8 -0
  225. package/dist/translations/oc.js +5 -0
  226. package/dist/translations/oc.umd.js +11 -0
  227. package/dist/translations/pl.d.ts +8 -0
  228. package/dist/translations/pl.js +5 -0
  229. package/dist/translations/pl.umd.js +11 -0
  230. package/dist/translations/pt-br.d.ts +8 -0
  231. package/dist/translations/pt-br.js +5 -0
  232. package/dist/translations/pt-br.umd.js +11 -0
  233. package/dist/translations/pt.d.ts +8 -0
  234. package/dist/translations/pt.js +5 -0
  235. package/dist/translations/pt.umd.js +11 -0
  236. package/dist/translations/ro.d.ts +8 -0
  237. package/dist/translations/ro.js +5 -0
  238. package/dist/translations/ro.umd.js +11 -0
  239. package/dist/translations/ru.d.ts +8 -0
  240. package/dist/translations/ru.js +5 -0
  241. package/dist/translations/ru.umd.js +11 -0
  242. package/dist/translations/si.d.ts +8 -0
  243. package/dist/translations/si.js +5 -0
  244. package/dist/translations/si.umd.js +11 -0
  245. package/dist/translations/sk.d.ts +8 -0
  246. package/dist/translations/sk.js +5 -0
  247. package/dist/translations/sk.umd.js +11 -0
  248. package/dist/translations/sl.d.ts +8 -0
  249. package/dist/translations/sl.js +5 -0
  250. package/dist/translations/sl.umd.js +11 -0
  251. package/dist/translations/sq.d.ts +8 -0
  252. package/dist/translations/sq.js +5 -0
  253. package/dist/translations/sq.umd.js +11 -0
  254. package/dist/translations/sr-latn.d.ts +8 -0
  255. package/dist/translations/sr-latn.js +5 -0
  256. package/dist/translations/sr-latn.umd.js +11 -0
  257. package/dist/translations/sr.d.ts +8 -0
  258. package/dist/translations/sr.js +5 -0
  259. package/dist/translations/sr.umd.js +11 -0
  260. package/dist/translations/sv.d.ts +8 -0
  261. package/dist/translations/sv.js +5 -0
  262. package/dist/translations/sv.umd.js +11 -0
  263. package/dist/translations/th.d.ts +8 -0
  264. package/dist/translations/th.js +5 -0
  265. package/dist/translations/th.umd.js +11 -0
  266. package/dist/translations/ti.d.ts +8 -0
  267. package/dist/translations/ti.js +5 -0
  268. package/dist/translations/ti.umd.js +11 -0
  269. package/dist/translations/tk.d.ts +8 -0
  270. package/dist/translations/tk.js +5 -0
  271. package/dist/translations/tk.umd.js +11 -0
  272. package/dist/translations/tr.d.ts +8 -0
  273. package/dist/translations/tr.js +5 -0
  274. package/dist/translations/tr.umd.js +11 -0
  275. package/dist/translations/tt.d.ts +8 -0
  276. package/dist/translations/tt.js +5 -0
  277. package/dist/translations/tt.umd.js +11 -0
  278. package/dist/translations/ug.d.ts +8 -0
  279. package/dist/translations/ug.js +5 -0
  280. package/dist/translations/ug.umd.js +11 -0
  281. package/dist/translations/uk.d.ts +8 -0
  282. package/dist/translations/uk.js +5 -0
  283. package/dist/translations/uk.umd.js +11 -0
  284. package/dist/translations/ur.d.ts +8 -0
  285. package/dist/translations/ur.js +5 -0
  286. package/dist/translations/ur.umd.js +11 -0
  287. package/dist/translations/uz.d.ts +8 -0
  288. package/dist/translations/uz.js +5 -0
  289. package/dist/translations/uz.umd.js +11 -0
  290. package/dist/translations/vi.d.ts +8 -0
  291. package/dist/translations/vi.js +5 -0
  292. package/dist/translations/vi.umd.js +11 -0
  293. package/dist/translations/zh-cn.d.ts +8 -0
  294. package/dist/translations/zh-cn.js +5 -0
  295. package/dist/translations/zh-cn.umd.js +11 -0
  296. package/dist/translations/zh.d.ts +8 -0
  297. package/dist/translations/zh.js +5 -0
  298. package/dist/translations/zh.umd.js +11 -0
  299. package/lang/contexts.json +24 -0
  300. package/lang/translations/af.po +100 -0
  301. package/lang/translations/ar.po +100 -0
  302. package/lang/translations/ast.po +100 -0
  303. package/lang/translations/az.po +100 -0
  304. package/lang/translations/bg.po +100 -0
  305. package/lang/translations/bn.po +100 -0
  306. package/lang/translations/bs.po +100 -0
  307. package/lang/translations/ca.po +100 -0
  308. package/lang/translations/cs.po +100 -0
  309. package/lang/translations/da.po +100 -0
  310. package/lang/translations/de-ch.po +100 -0
  311. package/lang/translations/de.po +100 -0
  312. package/lang/translations/el.po +100 -0
  313. package/lang/translations/en-au.po +100 -0
  314. package/lang/translations/en-gb.po +100 -0
  315. package/lang/translations/en.po +100 -0
  316. package/lang/translations/eo.po +100 -0
  317. package/lang/translations/es-co.po +100 -0
  318. package/lang/translations/es.po +100 -0
  319. package/lang/translations/et.po +100 -0
  320. package/lang/translations/eu.po +100 -0
  321. package/lang/translations/fa.po +100 -0
  322. package/lang/translations/fi.po +100 -0
  323. package/lang/translations/fr.po +100 -0
  324. package/lang/translations/gl.po +100 -0
  325. package/lang/translations/gu.po +100 -0
  326. package/lang/translations/he.po +100 -0
  327. package/lang/translations/hi.po +100 -0
  328. package/lang/translations/hr.po +100 -0
  329. package/lang/translations/hu.po +100 -0
  330. package/lang/translations/hy.po +100 -0
  331. package/lang/translations/id.po +100 -0
  332. package/lang/translations/it.po +100 -0
  333. package/lang/translations/ja.po +100 -0
  334. package/lang/translations/jv.po +100 -0
  335. package/lang/translations/kk.po +100 -0
  336. package/lang/translations/km.po +100 -0
  337. package/lang/translations/kn.po +100 -0
  338. package/lang/translations/ko.po +100 -0
  339. package/lang/translations/ku.po +100 -0
  340. package/lang/translations/lt.po +100 -0
  341. package/lang/translations/lv.po +100 -0
  342. package/lang/translations/ms.po +100 -0
  343. package/lang/translations/nb.po +100 -0
  344. package/lang/translations/ne.po +100 -0
  345. package/lang/translations/nl.po +100 -0
  346. package/lang/translations/no.po +100 -0
  347. package/lang/translations/oc.po +100 -0
  348. package/lang/translations/pl.po +100 -0
  349. package/lang/translations/pt-br.po +100 -0
  350. package/lang/translations/pt.po +100 -0
  351. package/lang/translations/ro.po +100 -0
  352. package/lang/translations/ru.po +100 -0
  353. package/lang/translations/si.po +100 -0
  354. package/lang/translations/sk.po +100 -0
  355. package/lang/translations/sl.po +100 -0
  356. package/lang/translations/sq.po +100 -0
  357. package/lang/translations/sr-latn.po +100 -0
  358. package/lang/translations/sr.po +100 -0
  359. package/lang/translations/sv.po +100 -0
  360. package/lang/translations/th.po +100 -0
  361. package/lang/translations/ti.po +100 -0
  362. package/lang/translations/tk.po +100 -0
  363. package/lang/translations/tr.po +100 -0
  364. package/lang/translations/tt.po +100 -0
  365. package/lang/translations/ug.po +100 -0
  366. package/lang/translations/uk.po +100 -0
  367. package/lang/translations/ur.po +100 -0
  368. package/lang/translations/uz.po +100 -0
  369. package/lang/translations/vi.po +100 -0
  370. package/lang/translations/zh-cn.po +100 -0
  371. package/lang/translations/zh.po +100 -0
  372. package/package.json +58 -5
  373. package/src/augmentation.d.ts +24 -0
  374. package/src/augmentation.js +5 -0
  375. package/src/emoji.d.ts +32 -0
  376. package/src/emoji.js +38 -0
  377. package/src/emojicommand.d.ts +24 -0
  378. package/src/emojicommand.js +33 -0
  379. package/src/emojiconfig.d.ts +80 -0
  380. package/src/emojiconfig.js +5 -0
  381. package/src/emojimention.d.ts +68 -0
  382. package/src/emojimention.js +193 -0
  383. package/src/emojipicker.d.ts +97 -0
  384. package/src/emojipicker.js +255 -0
  385. package/src/emojirepository.d.ts +139 -0
  386. package/src/emojirepository.js +267 -0
  387. package/src/index.d.ts +14 -0
  388. package/src/index.js +13 -0
  389. package/src/ui/emojicategoriesview.d.ts +68 -0
  390. package/src/ui/emojicategoriesview.js +131 -0
  391. package/src/ui/emojigridview.d.ts +140 -0
  392. package/src/ui/emojigridview.js +183 -0
  393. package/src/ui/emojipickerview.d.ts +91 -0
  394. package/src/ui/emojipickerview.js +172 -0
  395. package/src/ui/emojisearchview.d.ts +51 -0
  396. package/src/ui/emojisearchview.js +89 -0
  397. package/src/ui/emojitoneview.d.ts +46 -0
  398. package/src/ui/emojitoneview.js +89 -0
  399. package/theme/emojicategories.css +29 -0
  400. package/theme/emojigrid.css +55 -0
  401. package/theme/emojipicker.css +32 -0
  402. package/theme/emojitone.css +21 -0
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ import type { Emoji, EmojiConfig, EmojiMention, EmojiPicker, EmojiRepository, EmojiCommand } from './index.js';
6
+ declare module '@ckeditor/ckeditor5-core' {
7
+ interface EditorConfig {
8
+ /**
9
+ * The configuration of the {@link module:emoji/emoji~Emoji} feature.
10
+ *
11
+ * Read more in {@link module:emoji/emojiconfig~EmojiConfig}.
12
+ */
13
+ emoji?: EmojiConfig;
14
+ }
15
+ interface PluginsMap {
16
+ [Emoji.pluginName]: Emoji;
17
+ [EmojiMention.pluginName]: EmojiMention;
18
+ [EmojiPicker.pluginName]: EmojiPicker;
19
+ [EmojiRepository.pluginName]: EmojiRepository;
20
+ }
21
+ interface CommandsMap {
22
+ emoji: EmojiCommand;
23
+ }
24
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ export {};
package/src/emoji.d.ts ADDED
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ /**
6
+ * @module emoji/emoji
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import EmojiMention from './emojimention.js';
10
+ import EmojiPicker from './emojipicker.js';
11
+ /**
12
+ * The emoji plugin.
13
+ *
14
+ * This is a "glue" plugin which loads the following plugins:
15
+ *
16
+ * * {@link module:emoji/emojimention~EmojiMention},
17
+ * * {@link module:emoji/emojipicker~EmojiPicker},
18
+ */
19
+ export default class Emoji extends Plugin {
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ static get requires(): readonly [typeof EmojiMention, typeof EmojiPicker];
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static get pluginName(): "Emoji";
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ static get isOfficialPlugin(): true;
32
+ }
package/src/emoji.js ADDED
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ /**
6
+ * @module emoji/emoji
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import EmojiMention from './emojimention.js';
10
+ import EmojiPicker from './emojipicker.js';
11
+ /**
12
+ * The emoji plugin.
13
+ *
14
+ * This is a "glue" plugin which loads the following plugins:
15
+ *
16
+ * * {@link module:emoji/emojimention~EmojiMention},
17
+ * * {@link module:emoji/emojipicker~EmojiPicker},
18
+ */
19
+ export default class Emoji extends Plugin {
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ static get requires() {
24
+ return [EmojiMention, EmojiPicker];
25
+ }
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static get pluginName() {
30
+ return 'Emoji';
31
+ }
32
+ /**
33
+ * @inheritDoc
34
+ */
35
+ static get isOfficialPlugin() {
36
+ return true;
37
+ }
38
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ /**
6
+ * @module emoji/emojicommand
7
+ */
8
+ import { Command } from 'ckeditor5/src/core.js';
9
+ /**
10
+ * Command that shows the emoji user interface.
11
+ */
12
+ export default class EmojiCommand extends Command {
13
+ /**
14
+ * Updates the command's {@link #isEnabled} based on the current selection.
15
+ */
16
+ refresh(): void;
17
+ /**
18
+ * Opens emoji user interface for the current document selection.
19
+ *
20
+ * @fires execute
21
+ * @param [searchValue=''] A default query used to filer the grid when opening the UI.
22
+ */
23
+ execute(searchValue?: string): void;
24
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ /**
6
+ * @module emoji/emojicommand
7
+ */
8
+ import { Command } from 'ckeditor5/src/core.js';
9
+ /**
10
+ * Command that shows the emoji user interface.
11
+ */
12
+ export default class EmojiCommand extends Command {
13
+ /**
14
+ * Updates the command's {@link #isEnabled} based on the current selection.
15
+ */
16
+ refresh() {
17
+ const editor = this.editor;
18
+ const model = editor.model;
19
+ const schema = model.schema;
20
+ const selection = model.document.selection;
21
+ this.isEnabled = schema.checkChild(selection.getFirstPosition(), '$text');
22
+ }
23
+ /**
24
+ * Opens emoji user interface for the current document selection.
25
+ *
26
+ * @fires execute
27
+ * @param [searchValue=''] A default query used to filer the grid when opening the UI.
28
+ */
29
+ execute(searchValue = '') {
30
+ const emojiPickerPlugin = this.editor.plugins.get('EmojiPicker');
31
+ emojiPickerPlugin.showUI(searchValue);
32
+ }
33
+ }
@@ -0,0 +1,80 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ /**
6
+ * @module emoji/emojiconfig
7
+ */
8
+ /**
9
+ * The configuration of the emoji feature.
10
+ *
11
+ * Read more about {@glink features/emoji#configuration configuring the emoji feature}.
12
+ *
13
+ * ```ts
14
+ * ClassicEditor
15
+ * .create( editorElement, {
16
+ * emoji: ... // Emoji feature options.
17
+ * } )
18
+ * .then( ... )
19
+ * .catch( ... );
20
+ * ```
21
+ *
22
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.
23
+ */
24
+ export interface EmojiConfig {
25
+ /**
26
+ * The maximum number of emojis displayed in the dropdown list.
27
+ *
28
+ * ```ts
29
+ * ClassicEditor
30
+ * .create( editorElement, {
31
+ * plugins: [ Emoji, ... ],
32
+ * emoji: {
33
+ * dropdownLimit: 4
34
+ * }
35
+ * } )
36
+ * .then( ... )
37
+ * .catch( ... );
38
+ * ```
39
+ *
40
+ * @default 6
41
+ */
42
+ dropdownLimit?: number;
43
+ /**
44
+ * Initial skin tone for the emojis that support skin tones.
45
+ *
46
+ * ```ts
47
+ * ClassicEditor
48
+ * .create( editorElement, {
49
+ * plugins: [ Emoji, ... ],
50
+ * emoji: {
51
+ * skinTone: 'medium'
52
+ * }
53
+ * } )
54
+ * .then( ... )
55
+ * .catch( ... );
56
+ * ```
57
+ *
58
+ * @default 'default'
59
+ */
60
+ skinTone?: SkinToneId;
61
+ /**
62
+ * The emoji database version.
63
+ *
64
+ * ```ts
65
+ * ClassicEditor
66
+ * .create( editorElement, {
67
+ * plugins: [ Emoji, ... ],
68
+ * emoji: {
69
+ * version: 15
70
+ * }
71
+ * } )
72
+ * .then( ... )
73
+ * .catch( ... );
74
+ * ```
75
+ *
76
+ * @default 16
77
+ */
78
+ version?: 15 | 16;
79
+ }
80
+ export type SkinToneId = 'default' | 'light' | 'medium-light' | 'medium' | 'medium-dark' | 'dark';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ export {};
@@ -0,0 +1,68 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ import { Plugin, type Editor } from 'ckeditor5/src/core.js';
6
+ import { Typing } from 'ckeditor5/src/typing.js';
7
+ import EmojiRepository from './emojirepository.js';
8
+ /**
9
+ * The emoji mention plugin.
10
+ *
11
+ * Introduces the autocomplete of emojis while typing.
12
+ */
13
+ export default class EmojiMention extends Plugin {
14
+ /**
15
+ * An instance of the {@link module:emoji/emojipicker~EmojiPicker} plugin if it is loaded in the editor.
16
+ */
17
+ private _emojiPickerPlugin;
18
+ /**
19
+ * An instance of the {@link module:emoji/emojirepository~EmojiRepository} plugin.
20
+ */
21
+ private _emojiRepositoryPlugin;
22
+ /**
23
+ * Defines a number of displayed items in the auto complete dropdown.
24
+ *
25
+ * It includes the "Show all emoji..." option if the `EmojiPicker` plugin is loaded.
26
+ */
27
+ private readonly _emojiDropdownLimit;
28
+ /**
29
+ * Defines a skin tone that is set in the emoji config.
30
+ */
31
+ private readonly _skinTone;
32
+ /**
33
+ * @inheritDoc
34
+ */
35
+ static get requires(): readonly [typeof EmojiRepository, typeof Typing, "Mention"];
36
+ /**
37
+ * @inheritDoc
38
+ */
39
+ static get pluginName(): "EmojiMention";
40
+ /**
41
+ * @inheritDoc
42
+ */
43
+ static get isOfficialPlugin(): true;
44
+ /**
45
+ * @inheritDoc
46
+ */
47
+ constructor(editor: Editor);
48
+ /**
49
+ * @inheritDoc
50
+ */
51
+ init(): Promise<void>;
52
+ /**
53
+ * Initializes the configuration for emojis in the mention feature.
54
+ */
55
+ private _setupMentionConfiguration;
56
+ /**
57
+ * Returns the `itemRenderer()` callback for mention config.
58
+ */
59
+ private _customItemRendererFactory;
60
+ /**
61
+ * Overrides the default mention execute listener to insert an emoji as plain text instead.
62
+ */
63
+ private _overrideMentionExecuteListener;
64
+ /**
65
+ * Returns the `feed()` callback for mention config.
66
+ */
67
+ private _queryEmojiCallbackFactory;
68
+ }
@@ -0,0 +1,193 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ /**
6
+ * @module emoji/emojimention
7
+ */
8
+ import { logWarning } from 'ckeditor5/src/utils.js';
9
+ import { Plugin } from 'ckeditor5/src/core.js';
10
+ import { Typing } from 'ckeditor5/src/typing.js';
11
+ import EmojiRepository from './emojirepository.js';
12
+ const EMOJI_MENTION_MARKER = ':';
13
+ const EMOJI_SHOW_ALL_OPTION_ID = ':__EMOJI_SHOW_ALL:';
14
+ const EMOJI_HINT_OPTION_ID = ':__EMOJI_HINT:';
15
+ /**
16
+ * The emoji mention plugin.
17
+ *
18
+ * Introduces the autocomplete of emojis while typing.
19
+ */
20
+ export default class EmojiMention extends Plugin {
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ static get requires() {
25
+ return [EmojiRepository, Typing, 'Mention'];
26
+ }
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ static get pluginName() {
31
+ return 'EmojiMention';
32
+ }
33
+ /**
34
+ * @inheritDoc
35
+ */
36
+ static get isOfficialPlugin() {
37
+ return true;
38
+ }
39
+ /**
40
+ * @inheritDoc
41
+ */
42
+ constructor(editor) {
43
+ super(editor);
44
+ this.editor.config.define('emoji', {
45
+ dropdownLimit: 6
46
+ });
47
+ this._emojiDropdownLimit = editor.config.get('emoji.dropdownLimit');
48
+ this._skinTone = editor.config.get('emoji.skinTone');
49
+ const mentionFeedsConfigs = editor.config.get('mention.feeds');
50
+ const mergeFieldsPrefix = editor.config.get('mergeFields.prefix');
51
+ const markerAlreadyUsed = mentionFeedsConfigs.some(config => config.marker === EMOJI_MENTION_MARKER);
52
+ const isMarkerUsedByMergeFields = mergeFieldsPrefix ? mergeFieldsPrefix[0] === EMOJI_MENTION_MARKER : false;
53
+ if (markerAlreadyUsed || isMarkerUsedByMergeFields) {
54
+ /**
55
+ * The `marker` in the `emoji` config is already used by other plugin configuration.
56
+ *
57
+ * @error emoji-config-marker-already-used
58
+ * @param {string} marker Used marker.
59
+ */
60
+ logWarning('emoji-config-marker-already-used', { marker: EMOJI_MENTION_MARKER });
61
+ return;
62
+ }
63
+ this._setupMentionConfiguration(mentionFeedsConfigs);
64
+ }
65
+ /**
66
+ * @inheritDoc
67
+ */
68
+ async init() {
69
+ const editor = this.editor;
70
+ this._emojiPickerPlugin = editor.plugins.has('EmojiPicker') ? editor.plugins.get('EmojiPicker') : null;
71
+ this._emojiRepositoryPlugin = editor.plugins.get('EmojiRepository');
72
+ // Skip overriding the `mention` command listener if the emoji repository is not ready.
73
+ if (!await this._emojiRepositoryPlugin.isReady()) {
74
+ return;
75
+ }
76
+ editor.once('ready', this._overrideMentionExecuteListener.bind(this));
77
+ }
78
+ /**
79
+ * Initializes the configuration for emojis in the mention feature.
80
+ */
81
+ _setupMentionConfiguration(mentionFeedsConfigs) {
82
+ const emojiMentionFeedConfig = {
83
+ marker: EMOJI_MENTION_MARKER,
84
+ dropdownLimit: this._emojiDropdownLimit,
85
+ itemRenderer: this._customItemRendererFactory(this.editor.t),
86
+ feed: this._queryEmojiCallbackFactory()
87
+ };
88
+ this.editor.config.set('mention.feeds', [...mentionFeedsConfigs, emojiMentionFeedConfig]);
89
+ }
90
+ /**
91
+ * Returns the `itemRenderer()` callback for mention config.
92
+ */
93
+ _customItemRendererFactory(t) {
94
+ return (item) => {
95
+ const itemElement = document.createElement('button');
96
+ itemElement.classList.add('ck');
97
+ itemElement.classList.add('ck-button');
98
+ itemElement.classList.add('ck-button_with-text');
99
+ itemElement.id = `mention-list-item-id${item.id.slice(0, -1)}`;
100
+ itemElement.type = 'button';
101
+ itemElement.tabIndex = -1;
102
+ const labelElement = document.createElement('span');
103
+ labelElement.classList.add('ck');
104
+ labelElement.classList.add('ck-button__label');
105
+ itemElement.appendChild(labelElement);
106
+ if (item.id === EMOJI_HINT_OPTION_ID) {
107
+ itemElement.classList.add('ck-list-item-button');
108
+ itemElement.classList.add('ck-disabled');
109
+ labelElement.textContent = t('Keep on typing to see the emoji.');
110
+ }
111
+ else if (item.id === EMOJI_SHOW_ALL_OPTION_ID) {
112
+ labelElement.textContent = t('Show all emoji...');
113
+ }
114
+ else {
115
+ labelElement.textContent = `${item.text} ${item.id}`;
116
+ }
117
+ return itemElement;
118
+ };
119
+ }
120
+ /**
121
+ * Overrides the default mention execute listener to insert an emoji as plain text instead.
122
+ */
123
+ _overrideMentionExecuteListener() {
124
+ const editor = this.editor;
125
+ editor.commands.get('mention').on('execute', (event, data) => {
126
+ const eventData = data[0];
127
+ // Ignore non-emoji auto-complete actions.
128
+ if (eventData.marker !== EMOJI_MENTION_MARKER) {
129
+ return;
130
+ }
131
+ // Do not propagate the event.
132
+ event.stop();
133
+ // Do nothing when executing after selecting a hint message.
134
+ if (eventData.mention.id === EMOJI_HINT_OPTION_ID) {
135
+ return;
136
+ }
137
+ // Trigger the picker UI.
138
+ if (eventData.mention.id === EMOJI_SHOW_ALL_OPTION_ID) {
139
+ const text = [...eventData.range.getItems()]
140
+ .filter(item => item.is('$textProxy'))
141
+ .map(item => item.data)
142
+ .reduce((result, text) => result + text, '');
143
+ editor.model.change(writer => {
144
+ editor.model.deleteContent(writer.createSelection(eventData.range));
145
+ });
146
+ const emojiPickerPlugin = this._emojiPickerPlugin;
147
+ emojiPickerPlugin.showUI(text.slice(1));
148
+ setTimeout(() => {
149
+ emojiPickerPlugin.emojiPickerView.focus();
150
+ });
151
+ }
152
+ // Or insert the emoji to editor.
153
+ else {
154
+ editor.execute('insertText', {
155
+ text: eventData.mention.text,
156
+ range: eventData.range
157
+ });
158
+ }
159
+ }, { priority: 'high' });
160
+ }
161
+ /**
162
+ * Returns the `feed()` callback for mention config.
163
+ */
164
+ _queryEmojiCallbackFactory() {
165
+ return (searchQuery) => {
166
+ // Do not show anything when a query starts with a space.
167
+ if (searchQuery.startsWith(' ')) {
168
+ return [];
169
+ }
170
+ const emojis = this._emojiRepositoryPlugin.getEmojiByQuery(searchQuery)
171
+ .map(emoji => {
172
+ let text = emoji.skins[this._skinTone] || emoji.skins.default;
173
+ if (this._emojiPickerPlugin) {
174
+ text = emoji.skins[this._emojiPickerPlugin.skinTone] || emoji.skins.default;
175
+ }
176
+ return {
177
+ id: `:${emoji.annotation}:`,
178
+ text
179
+ };
180
+ });
181
+ if (!this._emojiPickerPlugin) {
182
+ return emojis.slice(0, this._emojiDropdownLimit);
183
+ }
184
+ const actionItem = {
185
+ id: searchQuery.length > 1 ? EMOJI_SHOW_ALL_OPTION_ID : EMOJI_HINT_OPTION_ID
186
+ };
187
+ return [
188
+ ...emojis.slice(0, this._emojiDropdownLimit - 1),
189
+ actionItem
190
+ ];
191
+ };
192
+ }
193
+ }
@@ -0,0 +1,97 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ /**
6
+ * @module emoji/emojipicker
7
+ */
8
+ import { ContextualBalloon, Dialog } from 'ckeditor5/src/ui.js';
9
+ import { Plugin } from 'ckeditor5/src/core.js';
10
+ import { Typing } from 'ckeditor5/src/typing.js';
11
+ import EmojiRepository from './emojirepository.js';
12
+ import EmojiPickerView from './ui/emojipickerview.js';
13
+ import type { SkinToneId } from './emojiconfig.js';
14
+ import '../theme/emojipicker.css';
15
+ /**
16
+ * The emoji picker plugin.
17
+ *
18
+ * Introduces the `'emoji'` dropdown.
19
+ */
20
+ export default class EmojiPicker extends Plugin {
21
+ /**
22
+ * The actions view displayed inside the balloon.
23
+ */
24
+ emojiPickerView: EmojiPickerView | undefined;
25
+ /**
26
+ * The contextual balloon plugin instance.
27
+ */
28
+ _balloonPlugin: ContextualBalloon;
29
+ /**
30
+ * An instance of the {@link module:emoji/emojirepository~EmojiRepository} plugin.
31
+ */
32
+ private _emojiRepositoryPlugin;
33
+ /**
34
+ * @inheritDoc
35
+ */
36
+ static get requires(): readonly [typeof EmojiRepository, typeof ContextualBalloon, typeof Dialog, typeof Typing];
37
+ /**
38
+ * @inheritDoc
39
+ */
40
+ static get pluginName(): "EmojiPicker";
41
+ /**
42
+ * @inheritDoc
43
+ */
44
+ static get isOfficialPlugin(): true;
45
+ /**
46
+ * @inheritDoc
47
+ */
48
+ init(): Promise<void>;
49
+ /**
50
+ * @inheritDoc
51
+ */
52
+ destroy(): void;
53
+ /**
54
+ * Represents an active skin tone. Its value depends on the emoji UI plugin.
55
+ *
56
+ * Before opening the UI for the first time, the returned value is read from the editor configuration.
57
+ * Otherwise, it reflects the user's intention.
58
+ */
59
+ get skinTone(): SkinToneId;
60
+ /**
61
+ * Displays the balloon with the emoji picker.
62
+ *
63
+ * @param [searchValue=''] A default query used to filer the grid when opening the UI.
64
+ */
65
+ showUI(searchValue?: string): void;
66
+ /**
67
+ * Creates a button for toolbar and menu bar that will show the emoji dialog.
68
+ */
69
+ private _createButton;
70
+ /**
71
+ * Creates an instance of the `EmojiPickerView` class that represents an emoji balloon.
72
+ */
73
+ private _createEmojiPickerView;
74
+ /**
75
+ * Hides the balloon with the emoji picker.
76
+ */
77
+ private _hideUI;
78
+ /**
79
+ * Registers converters.
80
+ */
81
+ private _setupConversion;
82
+ /**
83
+ * Returns positioning options for the {@link #_balloonPlugin}. They control the way the balloon is attached
84
+ * to the target element or selection.
85
+ */
86
+ private _getBalloonPositionData;
87
+ /**
88
+ * Displays a fake visual selection when the contextual balloon is displayed.
89
+ *
90
+ * This adds an 'emoji-picker' marker into the document that is rendered as a highlight on selected text fragment.
91
+ */
92
+ private _showFakeVisualSelection;
93
+ /**
94
+ * Hides the fake visual selection.
95
+ */
96
+ private _hideFakeVisualSelection;
97
+ }