@ckeditor/ckeditor5-highlight 0.0.0-internal-20241017.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 (326) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/LICENSE.md +17 -0
  3. package/README.md +26 -0
  4. package/build/highlight.js +5 -0
  5. package/build/translations/ar.js +1 -0
  6. package/build/translations/az.js +1 -0
  7. package/build/translations/bg.js +1 -0
  8. package/build/translations/bn.js +1 -0
  9. package/build/translations/ca.js +1 -0
  10. package/build/translations/cs.js +1 -0
  11. package/build/translations/da.js +1 -0
  12. package/build/translations/de-ch.js +1 -0
  13. package/build/translations/de.js +1 -0
  14. package/build/translations/el.js +1 -0
  15. package/build/translations/en-au.js +1 -0
  16. package/build/translations/en-gb.js +1 -0
  17. package/build/translations/es-co.js +1 -0
  18. package/build/translations/es.js +1 -0
  19. package/build/translations/et.js +1 -0
  20. package/build/translations/fa.js +1 -0
  21. package/build/translations/fi.js +1 -0
  22. package/build/translations/fr.js +1 -0
  23. package/build/translations/gl.js +1 -0
  24. package/build/translations/he.js +1 -0
  25. package/build/translations/hi.js +1 -0
  26. package/build/translations/hr.js +1 -0
  27. package/build/translations/hu.js +1 -0
  28. package/build/translations/id.js +1 -0
  29. package/build/translations/it.js +1 -0
  30. package/build/translations/ja.js +1 -0
  31. package/build/translations/jv.js +1 -0
  32. package/build/translations/ko.js +1 -0
  33. package/build/translations/ku.js +1 -0
  34. package/build/translations/lt.js +1 -0
  35. package/build/translations/lv.js +1 -0
  36. package/build/translations/ms.js +1 -0
  37. package/build/translations/nb.js +1 -0
  38. package/build/translations/ne.js +1 -0
  39. package/build/translations/nl.js +1 -0
  40. package/build/translations/no.js +1 -0
  41. package/build/translations/pl.js +1 -0
  42. package/build/translations/pt-br.js +1 -0
  43. package/build/translations/pt.js +1 -0
  44. package/build/translations/ro.js +1 -0
  45. package/build/translations/ru.js +1 -0
  46. package/build/translations/sk.js +1 -0
  47. package/build/translations/sl.js +1 -0
  48. package/build/translations/sq.js +1 -0
  49. package/build/translations/sr-latn.js +1 -0
  50. package/build/translations/sr.js +1 -0
  51. package/build/translations/sv.js +1 -0
  52. package/build/translations/th.js +1 -0
  53. package/build/translations/tk.js +1 -0
  54. package/build/translations/tr.js +1 -0
  55. package/build/translations/ug.js +1 -0
  56. package/build/translations/uk.js +1 -0
  57. package/build/translations/ur.js +1 -0
  58. package/build/translations/uz.js +1 -0
  59. package/build/translations/vi.js +1 -0
  60. package/build/translations/zh-cn.js +1 -0
  61. package/build/translations/zh.js +1 -0
  62. package/ckeditor5-metadata.json +38 -0
  63. package/dist/augmentation.d.ts +27 -0
  64. package/dist/highlight.d.ts +36 -0
  65. package/dist/highlightcommand.d.ts +49 -0
  66. package/dist/highlightconfig.d.ts +175 -0
  67. package/dist/highlightediting.d.ts +36 -0
  68. package/dist/highlightui.d.ts +85 -0
  69. package/dist/index-content.css +34 -0
  70. package/dist/index-editor.css +12 -0
  71. package/dist/index.css +45 -0
  72. package/dist/index.css.map +1 -0
  73. package/dist/index.d.ts +17 -0
  74. package/dist/index.js +485 -0
  75. package/dist/index.js.map +1 -0
  76. package/dist/translations/ar.d.ts +8 -0
  77. package/dist/translations/ar.js +5 -0
  78. package/dist/translations/ar.umd.js +11 -0
  79. package/dist/translations/az.d.ts +8 -0
  80. package/dist/translations/az.js +5 -0
  81. package/dist/translations/az.umd.js +11 -0
  82. package/dist/translations/bg.d.ts +8 -0
  83. package/dist/translations/bg.js +5 -0
  84. package/dist/translations/bg.umd.js +11 -0
  85. package/dist/translations/bn.d.ts +8 -0
  86. package/dist/translations/bn.js +5 -0
  87. package/dist/translations/bn.umd.js +11 -0
  88. package/dist/translations/ca.d.ts +8 -0
  89. package/dist/translations/ca.js +5 -0
  90. package/dist/translations/ca.umd.js +11 -0
  91. package/dist/translations/cs.d.ts +8 -0
  92. package/dist/translations/cs.js +5 -0
  93. package/dist/translations/cs.umd.js +11 -0
  94. package/dist/translations/da.d.ts +8 -0
  95. package/dist/translations/da.js +5 -0
  96. package/dist/translations/da.umd.js +11 -0
  97. package/dist/translations/de-ch.d.ts +8 -0
  98. package/dist/translations/de-ch.js +5 -0
  99. package/dist/translations/de-ch.umd.js +11 -0
  100. package/dist/translations/de.d.ts +8 -0
  101. package/dist/translations/de.js +5 -0
  102. package/dist/translations/de.umd.js +11 -0
  103. package/dist/translations/el.d.ts +8 -0
  104. package/dist/translations/el.js +5 -0
  105. package/dist/translations/el.umd.js +11 -0
  106. package/dist/translations/en-au.d.ts +8 -0
  107. package/dist/translations/en-au.js +5 -0
  108. package/dist/translations/en-au.umd.js +11 -0
  109. package/dist/translations/en-gb.d.ts +8 -0
  110. package/dist/translations/en-gb.js +5 -0
  111. package/dist/translations/en-gb.umd.js +11 -0
  112. package/dist/translations/en.d.ts +8 -0
  113. package/dist/translations/en.js +5 -0
  114. package/dist/translations/en.umd.js +11 -0
  115. package/dist/translations/es-co.d.ts +8 -0
  116. package/dist/translations/es-co.js +5 -0
  117. package/dist/translations/es-co.umd.js +11 -0
  118. package/dist/translations/es.d.ts +8 -0
  119. package/dist/translations/es.js +5 -0
  120. package/dist/translations/es.umd.js +11 -0
  121. package/dist/translations/et.d.ts +8 -0
  122. package/dist/translations/et.js +5 -0
  123. package/dist/translations/et.umd.js +11 -0
  124. package/dist/translations/fa.d.ts +8 -0
  125. package/dist/translations/fa.js +5 -0
  126. package/dist/translations/fa.umd.js +11 -0
  127. package/dist/translations/fi.d.ts +8 -0
  128. package/dist/translations/fi.js +5 -0
  129. package/dist/translations/fi.umd.js +11 -0
  130. package/dist/translations/fr.d.ts +8 -0
  131. package/dist/translations/fr.js +5 -0
  132. package/dist/translations/fr.umd.js +11 -0
  133. package/dist/translations/gl.d.ts +8 -0
  134. package/dist/translations/gl.js +5 -0
  135. package/dist/translations/gl.umd.js +11 -0
  136. package/dist/translations/he.d.ts +8 -0
  137. package/dist/translations/he.js +5 -0
  138. package/dist/translations/he.umd.js +11 -0
  139. package/dist/translations/hi.d.ts +8 -0
  140. package/dist/translations/hi.js +5 -0
  141. package/dist/translations/hi.umd.js +11 -0
  142. package/dist/translations/hr.d.ts +8 -0
  143. package/dist/translations/hr.js +5 -0
  144. package/dist/translations/hr.umd.js +11 -0
  145. package/dist/translations/hu.d.ts +8 -0
  146. package/dist/translations/hu.js +5 -0
  147. package/dist/translations/hu.umd.js +11 -0
  148. package/dist/translations/id.d.ts +8 -0
  149. package/dist/translations/id.js +5 -0
  150. package/dist/translations/id.umd.js +11 -0
  151. package/dist/translations/it.d.ts +8 -0
  152. package/dist/translations/it.js +5 -0
  153. package/dist/translations/it.umd.js +11 -0
  154. package/dist/translations/ja.d.ts +8 -0
  155. package/dist/translations/ja.js +5 -0
  156. package/dist/translations/ja.umd.js +11 -0
  157. package/dist/translations/jv.d.ts +8 -0
  158. package/dist/translations/jv.js +5 -0
  159. package/dist/translations/jv.umd.js +11 -0
  160. package/dist/translations/ko.d.ts +8 -0
  161. package/dist/translations/ko.js +5 -0
  162. package/dist/translations/ko.umd.js +11 -0
  163. package/dist/translations/ku.d.ts +8 -0
  164. package/dist/translations/ku.js +5 -0
  165. package/dist/translations/ku.umd.js +11 -0
  166. package/dist/translations/lt.d.ts +8 -0
  167. package/dist/translations/lt.js +5 -0
  168. package/dist/translations/lt.umd.js +11 -0
  169. package/dist/translations/lv.d.ts +8 -0
  170. package/dist/translations/lv.js +5 -0
  171. package/dist/translations/lv.umd.js +11 -0
  172. package/dist/translations/ms.d.ts +8 -0
  173. package/dist/translations/ms.js +5 -0
  174. package/dist/translations/ms.umd.js +11 -0
  175. package/dist/translations/nb.d.ts +8 -0
  176. package/dist/translations/nb.js +5 -0
  177. package/dist/translations/nb.umd.js +11 -0
  178. package/dist/translations/ne.d.ts +8 -0
  179. package/dist/translations/ne.js +5 -0
  180. package/dist/translations/ne.umd.js +11 -0
  181. package/dist/translations/nl.d.ts +8 -0
  182. package/dist/translations/nl.js +5 -0
  183. package/dist/translations/nl.umd.js +11 -0
  184. package/dist/translations/no.d.ts +8 -0
  185. package/dist/translations/no.js +5 -0
  186. package/dist/translations/no.umd.js +11 -0
  187. package/dist/translations/pl.d.ts +8 -0
  188. package/dist/translations/pl.js +5 -0
  189. package/dist/translations/pl.umd.js +11 -0
  190. package/dist/translations/pt-br.d.ts +8 -0
  191. package/dist/translations/pt-br.js +5 -0
  192. package/dist/translations/pt-br.umd.js +11 -0
  193. package/dist/translations/pt.d.ts +8 -0
  194. package/dist/translations/pt.js +5 -0
  195. package/dist/translations/pt.umd.js +11 -0
  196. package/dist/translations/ro.d.ts +8 -0
  197. package/dist/translations/ro.js +5 -0
  198. package/dist/translations/ro.umd.js +11 -0
  199. package/dist/translations/ru.d.ts +8 -0
  200. package/dist/translations/ru.js +5 -0
  201. package/dist/translations/ru.umd.js +11 -0
  202. package/dist/translations/sk.d.ts +8 -0
  203. package/dist/translations/sk.js +5 -0
  204. package/dist/translations/sk.umd.js +11 -0
  205. package/dist/translations/sl.d.ts +8 -0
  206. package/dist/translations/sl.js +5 -0
  207. package/dist/translations/sl.umd.js +11 -0
  208. package/dist/translations/sq.d.ts +8 -0
  209. package/dist/translations/sq.js +5 -0
  210. package/dist/translations/sq.umd.js +11 -0
  211. package/dist/translations/sr-latn.d.ts +8 -0
  212. package/dist/translations/sr-latn.js +5 -0
  213. package/dist/translations/sr-latn.umd.js +11 -0
  214. package/dist/translations/sr.d.ts +8 -0
  215. package/dist/translations/sr.js +5 -0
  216. package/dist/translations/sr.umd.js +11 -0
  217. package/dist/translations/sv.d.ts +8 -0
  218. package/dist/translations/sv.js +5 -0
  219. package/dist/translations/sv.umd.js +11 -0
  220. package/dist/translations/th.d.ts +8 -0
  221. package/dist/translations/th.js +5 -0
  222. package/dist/translations/th.umd.js +11 -0
  223. package/dist/translations/tk.d.ts +8 -0
  224. package/dist/translations/tk.js +5 -0
  225. package/dist/translations/tk.umd.js +11 -0
  226. package/dist/translations/tr.d.ts +8 -0
  227. package/dist/translations/tr.js +5 -0
  228. package/dist/translations/tr.umd.js +11 -0
  229. package/dist/translations/ug.d.ts +8 -0
  230. package/dist/translations/ug.js +5 -0
  231. package/dist/translations/ug.umd.js +11 -0
  232. package/dist/translations/uk.d.ts +8 -0
  233. package/dist/translations/uk.js +5 -0
  234. package/dist/translations/uk.umd.js +11 -0
  235. package/dist/translations/ur.d.ts +8 -0
  236. package/dist/translations/ur.js +5 -0
  237. package/dist/translations/ur.umd.js +11 -0
  238. package/dist/translations/uz.d.ts +8 -0
  239. package/dist/translations/uz.js +5 -0
  240. package/dist/translations/uz.umd.js +11 -0
  241. package/dist/translations/vi.d.ts +8 -0
  242. package/dist/translations/vi.js +5 -0
  243. package/dist/translations/vi.umd.js +11 -0
  244. package/dist/translations/zh-cn.d.ts +8 -0
  245. package/dist/translations/zh-cn.js +5 -0
  246. package/dist/translations/zh-cn.umd.js +11 -0
  247. package/dist/translations/zh.d.ts +8 -0
  248. package/dist/translations/zh.js +5 -0
  249. package/dist/translations/zh.umd.js +11 -0
  250. package/lang/contexts.json +11 -0
  251. package/lang/translations/ar.po +54 -0
  252. package/lang/translations/az.po +54 -0
  253. package/lang/translations/bg.po +54 -0
  254. package/lang/translations/bn.po +54 -0
  255. package/lang/translations/ca.po +54 -0
  256. package/lang/translations/cs.po +54 -0
  257. package/lang/translations/da.po +54 -0
  258. package/lang/translations/de-ch.po +54 -0
  259. package/lang/translations/de.po +54 -0
  260. package/lang/translations/el.po +54 -0
  261. package/lang/translations/en-au.po +54 -0
  262. package/lang/translations/en-gb.po +54 -0
  263. package/lang/translations/en.po +54 -0
  264. package/lang/translations/es-co.po +54 -0
  265. package/lang/translations/es.po +54 -0
  266. package/lang/translations/et.po +54 -0
  267. package/lang/translations/fa.po +54 -0
  268. package/lang/translations/fi.po +54 -0
  269. package/lang/translations/fr.po +54 -0
  270. package/lang/translations/gl.po +54 -0
  271. package/lang/translations/he.po +54 -0
  272. package/lang/translations/hi.po +54 -0
  273. package/lang/translations/hr.po +54 -0
  274. package/lang/translations/hu.po +54 -0
  275. package/lang/translations/id.po +54 -0
  276. package/lang/translations/it.po +54 -0
  277. package/lang/translations/ja.po +54 -0
  278. package/lang/translations/jv.po +54 -0
  279. package/lang/translations/ko.po +54 -0
  280. package/lang/translations/ku.po +54 -0
  281. package/lang/translations/lt.po +54 -0
  282. package/lang/translations/lv.po +54 -0
  283. package/lang/translations/ms.po +54 -0
  284. package/lang/translations/nb.po +54 -0
  285. package/lang/translations/ne.po +54 -0
  286. package/lang/translations/nl.po +54 -0
  287. package/lang/translations/no.po +54 -0
  288. package/lang/translations/pl.po +54 -0
  289. package/lang/translations/pt-br.po +54 -0
  290. package/lang/translations/pt.po +54 -0
  291. package/lang/translations/ro.po +54 -0
  292. package/lang/translations/ru.po +54 -0
  293. package/lang/translations/sk.po +54 -0
  294. package/lang/translations/sl.po +54 -0
  295. package/lang/translations/sq.po +54 -0
  296. package/lang/translations/sr-latn.po +54 -0
  297. package/lang/translations/sr.po +54 -0
  298. package/lang/translations/sv.po +54 -0
  299. package/lang/translations/th.po +54 -0
  300. package/lang/translations/tk.po +54 -0
  301. package/lang/translations/tr.po +54 -0
  302. package/lang/translations/ug.po +54 -0
  303. package/lang/translations/uk.po +54 -0
  304. package/lang/translations/ur.po +54 -0
  305. package/lang/translations/uz.po +54 -0
  306. package/lang/translations/vi.po +54 -0
  307. package/lang/translations/zh-cn.po +54 -0
  308. package/lang/translations/zh.po +54 -0
  309. package/package.json +40 -0
  310. package/src/augmentation.d.ts +23 -0
  311. package/src/augmentation.js +5 -0
  312. package/src/highlight.d.ts +32 -0
  313. package/src/highlight.js +38 -0
  314. package/src/highlightcommand.d.ts +45 -0
  315. package/src/highlightcommand.js +91 -0
  316. package/src/highlightconfig.d.ts +171 -0
  317. package/src/highlightconfig.js +5 -0
  318. package/src/highlightediting.d.ts +32 -0
  319. package/src/highlightediting.js +115 -0
  320. package/src/highlightui.d.ts +81 -0
  321. package/src/highlightui.js +277 -0
  322. package/src/index.d.ts +13 -0
  323. package/src/index.js +11 -0
  324. package/theme/highlight.css +36 -0
  325. package/theme/icons/marker.svg +1 -0
  326. package/theme/icons/pen.svg +1 -0
@@ -0,0 +1,54 @@
1
+ # Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
2
+ #
3
+ # !!! IMPORTANT !!!
4
+ #
5
+ # Before you edit this file, please keep in mind that contributing to the project
6
+ # translations is possible ONLY via the Transifex online service.
7
+ #
8
+ # To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
9
+ #
10
+ # To learn more, check out the official contributor's guide:
11
+ # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
12
+ #
13
+ msgid ""
14
+ msgstr ""
15
+ "Language-Team: Uzbek (https://app.transifex.com/ckeditor/teams/11143/uz/)\n"
16
+ "Language: uz\n"
17
+ "Plural-Forms: nplurals=1; plural=0;\n"
18
+ "Content-Type: text/plain; charset=UTF-8\n"
19
+
20
+ msgctxt "Toolbar button tooltip for applying yellow marker (text highlight)."
21
+ msgid "Yellow marker"
22
+ msgstr "Sariq marker bilan ta'kidlash"
23
+
24
+ msgctxt "Toolbar button tooltip for applying green marker (text highlight)."
25
+ msgid "Green marker"
26
+ msgstr "Yashil marker bilan ta'kidlash"
27
+
28
+ msgctxt "Toolbar button tooltip for applying pink marker (text highlight)."
29
+ msgid "Pink marker"
30
+ msgstr "Pushti rang markeri bilan belgilang"
31
+
32
+ msgctxt "Toolbar button tooltip for applying blue marker (text highlight)."
33
+ msgid "Blue marker"
34
+ msgstr "Moviy rang markeri bilan ajratib ko'rsatish"
35
+
36
+ msgctxt "Toolbar button tooltip for applying red pen (text color)."
37
+ msgid "Red pen"
38
+ msgstr "Matn rangi qizil"
39
+
40
+ msgctxt "Toolbar button tooltip for applying green pen (text color)."
41
+ msgid "Green pen"
42
+ msgstr "Matn rangi yashil"
43
+
44
+ msgctxt "Toolbar button tooltip for removing text highlight."
45
+ msgid "Remove highlight"
46
+ msgstr "Ajratishni olib tashlash"
47
+
48
+ msgctxt "Toolbar button tooltip for the text highlight feature."
49
+ msgid "Highlight"
50
+ msgstr "Ajratish"
51
+
52
+ msgctxt "Label used by assistive technologies describing the highlight feature toolbar."
53
+ msgid "Text highlight toolbar"
54
+ msgstr "Matn tanlash asboblar paneli"
@@ -0,0 +1,54 @@
1
+ # Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
2
+ #
3
+ # !!! IMPORTANT !!!
4
+ #
5
+ # Before you edit this file, please keep in mind that contributing to the project
6
+ # translations is possible ONLY via the Transifex online service.
7
+ #
8
+ # To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
9
+ #
10
+ # To learn more, check out the official contributor's guide:
11
+ # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
12
+ #
13
+ msgid ""
14
+ msgstr ""
15
+ "Language-Team: Vietnamese (https://app.transifex.com/ckeditor/teams/11143/vi/)\n"
16
+ "Language: vi\n"
17
+ "Plural-Forms: nplurals=1; plural=0;\n"
18
+ "Content-Type: text/plain; charset=UTF-8\n"
19
+
20
+ msgctxt "Toolbar button tooltip for applying yellow marker (text highlight)."
21
+ msgid "Yellow marker"
22
+ msgstr "Bút vàng"
23
+
24
+ msgctxt "Toolbar button tooltip for applying green marker (text highlight)."
25
+ msgid "Green marker"
26
+ msgstr "Bút xanh lá"
27
+
28
+ msgctxt "Toolbar button tooltip for applying pink marker (text highlight)."
29
+ msgid "Pink marker"
30
+ msgstr "Bút hồng"
31
+
32
+ msgctxt "Toolbar button tooltip for applying blue marker (text highlight)."
33
+ msgid "Blue marker"
34
+ msgstr "Bút xanh dương"
35
+
36
+ msgctxt "Toolbar button tooltip for applying red pen (text color)."
37
+ msgid "Red pen"
38
+ msgstr "Mực đỏ"
39
+
40
+ msgctxt "Toolbar button tooltip for applying green pen (text color)."
41
+ msgid "Green pen"
42
+ msgstr "Mực xanh"
43
+
44
+ msgctxt "Toolbar button tooltip for removing text highlight."
45
+ msgid "Remove highlight"
46
+ msgstr "Xóa làm nổi"
47
+
48
+ msgctxt "Toolbar button tooltip for the text highlight feature."
49
+ msgid "Highlight"
50
+ msgstr "Làm nổi"
51
+
52
+ msgctxt "Label used by assistive technologies describing the highlight feature toolbar."
53
+ msgid "Text highlight toolbar"
54
+ msgstr "Thanh công cụ làm nổi chữ"
@@ -0,0 +1,54 @@
1
+ # Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
2
+ #
3
+ # !!! IMPORTANT !!!
4
+ #
5
+ # Before you edit this file, please keep in mind that contributing to the project
6
+ # translations is possible ONLY via the Transifex online service.
7
+ #
8
+ # To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
9
+ #
10
+ # To learn more, check out the official contributor's guide:
11
+ # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
12
+ #
13
+ msgid ""
14
+ msgstr ""
15
+ "Language-Team: Chinese (China) (https://app.transifex.com/ckeditor/teams/11143/zh_CN/)\n"
16
+ "Language: zh_CN\n"
17
+ "Plural-Forms: nplurals=1; plural=0;\n"
18
+ "Content-Type: text/plain; charset=UTF-8\n"
19
+
20
+ msgctxt "Toolbar button tooltip for applying yellow marker (text highlight)."
21
+ msgid "Yellow marker"
22
+ msgstr "黄色标记"
23
+
24
+ msgctxt "Toolbar button tooltip for applying green marker (text highlight)."
25
+ msgid "Green marker"
26
+ msgstr "绿色标记"
27
+
28
+ msgctxt "Toolbar button tooltip for applying pink marker (text highlight)."
29
+ msgid "Pink marker"
30
+ msgstr "粉色标记"
31
+
32
+ msgctxt "Toolbar button tooltip for applying blue marker (text highlight)."
33
+ msgid "Blue marker"
34
+ msgstr "蓝色标记"
35
+
36
+ msgctxt "Toolbar button tooltip for applying red pen (text color)."
37
+ msgid "Red pen"
38
+ msgstr "红色笔"
39
+
40
+ msgctxt "Toolbar button tooltip for applying green pen (text color)."
41
+ msgid "Green pen"
42
+ msgstr "绿色笔"
43
+
44
+ msgctxt "Toolbar button tooltip for removing text highlight."
45
+ msgid "Remove highlight"
46
+ msgstr "清除高亮"
47
+
48
+ msgctxt "Toolbar button tooltip for the text highlight feature."
49
+ msgid "Highlight"
50
+ msgstr "高亮"
51
+
52
+ msgctxt "Label used by assistive technologies describing the highlight feature toolbar."
53
+ msgid "Text highlight toolbar"
54
+ msgstr "文本高亮工具栏"
@@ -0,0 +1,54 @@
1
+ # Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
2
+ #
3
+ # !!! IMPORTANT !!!
4
+ #
5
+ # Before you edit this file, please keep in mind that contributing to the project
6
+ # translations is possible ONLY via the Transifex online service.
7
+ #
8
+ # To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
9
+ #
10
+ # To learn more, check out the official contributor's guide:
11
+ # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
12
+ #
13
+ msgid ""
14
+ msgstr ""
15
+ "Language-Team: Chinese (Taiwan) (https://app.transifex.com/ckeditor/teams/11143/zh_TW/)\n"
16
+ "Language: zh_TW\n"
17
+ "Plural-Forms: nplurals=1; plural=0;\n"
18
+ "Content-Type: text/plain; charset=UTF-8\n"
19
+
20
+ msgctxt "Toolbar button tooltip for applying yellow marker (text highlight)."
21
+ msgid "Yellow marker"
22
+ msgstr "黃色標記"
23
+
24
+ msgctxt "Toolbar button tooltip for applying green marker (text highlight)."
25
+ msgid "Green marker"
26
+ msgstr "綠色標記"
27
+
28
+ msgctxt "Toolbar button tooltip for applying pink marker (text highlight)."
29
+ msgid "Pink marker"
30
+ msgstr "粉色標記"
31
+
32
+ msgctxt "Toolbar button tooltip for applying blue marker (text highlight)."
33
+ msgid "Blue marker"
34
+ msgstr "藍色標記"
35
+
36
+ msgctxt "Toolbar button tooltip for applying red pen (text color)."
37
+ msgid "Red pen"
38
+ msgstr "紅色筆"
39
+
40
+ msgctxt "Toolbar button tooltip for applying green pen (text color)."
41
+ msgid "Green pen"
42
+ msgstr "綠色筆"
43
+
44
+ msgctxt "Toolbar button tooltip for removing text highlight."
45
+ msgid "Remove highlight"
46
+ msgstr "清除高亮"
47
+
48
+ msgctxt "Toolbar button tooltip for the text highlight feature."
49
+ msgid "Highlight"
50
+ msgstr "高亮"
51
+
52
+ msgctxt "Label used by assistive technologies describing the highlight feature toolbar."
53
+ msgid "Text highlight toolbar"
54
+ msgstr "高亮"
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@ckeditor/ckeditor5-highlight",
3
+ "version": "0.0.0-internal-20241017.0",
4
+ "description": "Highlight feature for CKEditor 5.",
5
+ "keywords": [
6
+ "ckeditor",
7
+ "ckeditor5",
8
+ "ckeditor 5",
9
+ "ckeditor5-feature",
10
+ "ckeditor5-plugin",
11
+ "ckeditor5-dll"
12
+ ],
13
+ "type": "module",
14
+ "main": "src/index.js",
15
+ "dependencies": {
16
+ "@ckeditor/ckeditor5-core": "0.0.0-internal-20241017.0",
17
+ "@ckeditor/ckeditor5-ui": "0.0.0-internal-20241017.0",
18
+ "ckeditor5": "0.0.0-internal-20241017.0"
19
+ },
20
+ "author": "CKSource (http://cksource.com/)",
21
+ "license": "GPL-2.0-or-later",
22
+ "homepage": "https://ckeditor.com/ckeditor-5",
23
+ "bugs": "https://github.com/ckeditor/ckeditor5/issues",
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "https://github.com/ckeditor/ckeditor5.git",
27
+ "directory": "packages/ckeditor5-highlight"
28
+ },
29
+ "files": [
30
+ "dist",
31
+ "lang",
32
+ "src/**/*.js",
33
+ "src/**/*.d.ts",
34
+ "theme",
35
+ "build",
36
+ "ckeditor5-metadata.json",
37
+ "CHANGELOG.md"
38
+ ],
39
+ "types": "src/index.d.ts"
40
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ import type { Highlight, HighlightCommand, HighlightConfig, HighlightEditing, HighlightUI } from './index.js';
6
+ declare module '@ckeditor/ckeditor5-core' {
7
+ interface EditorConfig {
8
+ /**
9
+ * The configuration of the {@link module:highlight/highlight~Highlight} feature.
10
+ *
11
+ * Read more in {@link module:highlight/highlightconfig~HighlightConfig}.
12
+ */
13
+ highlight?: HighlightConfig;
14
+ }
15
+ interface PluginsMap {
16
+ [Highlight.pluginName]: Highlight;
17
+ [HighlightEditing.pluginName]: HighlightEditing;
18
+ [HighlightUI.pluginName]: HighlightUI;
19
+ }
20
+ interface CommandsMap {
21
+ highlight: HighlightCommand;
22
+ }
23
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ export {};
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module highlight/highlight
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import HighlightEditing from './highlightediting.js';
10
+ import HighlightUI from './highlightui.js';
11
+ /**
12
+ * The highlight plugin.
13
+ *
14
+ * For a detailed overview, check the {@glink features/highlight Highlight feature} documentation.
15
+ *
16
+ * This is a "glue" plugin which loads the {@link module:highlight/highlightediting~HighlightEditing} and
17
+ * {@link module:highlight/highlightui~HighlightUI} plugins.
18
+ */
19
+ export default class Highlight extends Plugin {
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ static get requires(): readonly [typeof HighlightEditing, typeof HighlightUI];
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static get pluginName(): "Highlight";
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ static get isOfficialPlugin(): true;
32
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module highlight/highlight
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import HighlightEditing from './highlightediting.js';
10
+ import HighlightUI from './highlightui.js';
11
+ /**
12
+ * The highlight plugin.
13
+ *
14
+ * For a detailed overview, check the {@glink features/highlight Highlight feature} documentation.
15
+ *
16
+ * This is a "glue" plugin which loads the {@link module:highlight/highlightediting~HighlightEditing} and
17
+ * {@link module:highlight/highlightui~HighlightUI} plugins.
18
+ */
19
+ export default class Highlight extends Plugin {
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ static get requires() {
24
+ return [HighlightEditing, HighlightUI];
25
+ }
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static get pluginName() {
30
+ return 'Highlight';
31
+ }
32
+ /**
33
+ * @inheritDoc
34
+ */
35
+ static get isOfficialPlugin() {
36
+ return true;
37
+ }
38
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module highlight/highlightcommand
7
+ */
8
+ import { Command } from 'ckeditor5/src/core.js';
9
+ /**
10
+ * The highlight command. It is used by the {@link module:highlight/highlightediting~HighlightEditing highlight feature}
11
+ * to apply the text highlighting.
12
+ *
13
+ * ```ts
14
+ * editor.execute( 'highlight', { value: 'greenMarker' } );
15
+ * ```
16
+ *
17
+ * **Note**: Executing the command without a value removes the attribute from the model. If the selection is collapsed
18
+ * inside a text with the highlight attribute, the command will remove the attribute from the entire range
19
+ * of that text.
20
+ */
21
+ export default class HighlightCommand extends Command {
22
+ /**
23
+ * A value indicating whether the command is active. If the selection has some highlight attribute,
24
+ * it corresponds to the value of that attribute.
25
+ *
26
+ * @observable
27
+ * @readonly
28
+ */
29
+ value: string | undefined;
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ refresh(): void;
34
+ /**
35
+ * Executes the command.
36
+ *
37
+ * @param options Options for the executed command.
38
+ * @param options.value The value to apply.
39
+ *
40
+ * @fires execute
41
+ */
42
+ execute(options?: {
43
+ value?: string | null;
44
+ }): void;
45
+ }
@@ -0,0 +1,91 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module highlight/highlightcommand
7
+ */
8
+ import { Command } from 'ckeditor5/src/core.js';
9
+ /**
10
+ * The highlight command. It is used by the {@link module:highlight/highlightediting~HighlightEditing highlight feature}
11
+ * to apply the text highlighting.
12
+ *
13
+ * ```ts
14
+ * editor.execute( 'highlight', { value: 'greenMarker' } );
15
+ * ```
16
+ *
17
+ * **Note**: Executing the command without a value removes the attribute from the model. If the selection is collapsed
18
+ * inside a text with the highlight attribute, the command will remove the attribute from the entire range
19
+ * of that text.
20
+ */
21
+ export default class HighlightCommand extends Command {
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ refresh() {
26
+ const model = this.editor.model;
27
+ const doc = model.document;
28
+ this.value = doc.selection.getAttribute('highlight');
29
+ this.isEnabled = model.schema.checkAttributeInSelection(doc.selection, 'highlight');
30
+ }
31
+ /**
32
+ * Executes the command.
33
+ *
34
+ * @param options Options for the executed command.
35
+ * @param options.value The value to apply.
36
+ *
37
+ * @fires execute
38
+ */
39
+ execute(options = {}) {
40
+ const model = this.editor.model;
41
+ const document = model.document;
42
+ const selection = document.selection;
43
+ const highlighter = options.value;
44
+ model.change(writer => {
45
+ if (selection.isCollapsed) {
46
+ const position = selection.getFirstPosition();
47
+ // When selection is inside text with `highlight` attribute.
48
+ if (selection.hasAttribute('highlight')) {
49
+ // Find the full highlighted range.
50
+ const isSameHighlight = (value) => {
51
+ return value.item.hasAttribute('highlight') && value.item.getAttribute('highlight') === this.value;
52
+ };
53
+ const highlightStart = position.getLastMatchingPosition(isSameHighlight, { direction: 'backward' });
54
+ const highlightEnd = position.getLastMatchingPosition(isSameHighlight);
55
+ const highlightRange = writer.createRange(highlightStart, highlightEnd);
56
+ // Then depending on current value...
57
+ if (!highlighter || this.value === highlighter) {
58
+ // ...remove attribute when passing highlighter different then current or executing "eraser".
59
+ // If we're at the end of the highlighted range, we don't want to remove highlight of the range.
60
+ if (!position.isEqual(highlightEnd)) {
61
+ writer.removeAttribute('highlight', highlightRange);
62
+ }
63
+ writer.removeSelectionAttribute('highlight');
64
+ }
65
+ else {
66
+ // ...update `highlight` value.
67
+ // If we're at the end of the highlighted range, we don't want to change the highlight of the range.
68
+ if (!position.isEqual(highlightEnd)) {
69
+ writer.setAttribute('highlight', highlighter, highlightRange);
70
+ }
71
+ writer.setSelectionAttribute('highlight', highlighter);
72
+ }
73
+ }
74
+ else if (highlighter) {
75
+ writer.setSelectionAttribute('highlight', highlighter);
76
+ }
77
+ }
78
+ else {
79
+ const ranges = model.schema.getValidRanges(selection.getRanges(), 'highlight');
80
+ for (const range of ranges) {
81
+ if (highlighter) {
82
+ writer.setAttribute('highlight', highlighter, range);
83
+ }
84
+ else {
85
+ writer.removeAttribute('highlight', range);
86
+ }
87
+ }
88
+ }
89
+ });
90
+ }
91
+ }
@@ -0,0 +1,171 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module highlight/highlightconfig
7
+ */
8
+ /**
9
+ * The highlight option descriptor. See {@link module:highlight/highlightconfig~HighlightConfig} to learn more.
10
+ *
11
+ * ```ts
12
+ * {
13
+ * model: 'pinkMarker',
14
+ * class: 'marker-pink',
15
+ * title: 'Pink Marker',
16
+ * color: 'var(--ck-highlight-marker-pink)',
17
+ * type: 'marker'
18
+ * }
19
+ * ```
20
+ */
21
+ export interface HighlightOption {
22
+ /**
23
+ * The user-readable title of the option.
24
+ */
25
+ title: string;
26
+ /**
27
+ * The unique attribute value in the model.
28
+ */
29
+ model: string;
30
+ /**
31
+ * The CSS `var()` used for the highlighter. The color is used in the user interface to represent the highlighter.
32
+ * There is a possibility to use the default color format like rgb, hex or hsl, but you need to care about the color of `<mark>`
33
+ * by adding CSS classes definition.
34
+ */
35
+ color: string;
36
+ /**
37
+ * The CSS class used on the `<mark>` element in the view. It should match the `color` setting.
38
+ */
39
+ class: string;
40
+ /**
41
+ * The type of highlighter:
42
+ *
43
+ * * `'marker'` &ndash; Uses the `color` as the `background-color` style,
44
+ * * `'pen'` &ndash; Uses the `color` as the font `color` style.
45
+ */
46
+ type: 'marker' | 'pen';
47
+ }
48
+ /**
49
+ * The configuration of the {@link module:highlight/highlight~Highlight highlight feature}.
50
+ * ```ts
51
+ * ClassicEditor
52
+ * .create( editorElement, {
53
+ * highlight: ... // Highlight feature configuration.
54
+ * } )
55
+ * .then( ... )
56
+ * .catch( ... );
57
+ * ```
58
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
59
+ */
60
+ export interface HighlightConfig {
61
+ /**
62
+ * The available highlight options. The default value is:
63
+ * ```ts
64
+ * options: [
65
+ * {
66
+ * model: 'yellowMarker',
67
+ * class: 'marker-yellow',
68
+ * title: 'Yellow marker',
69
+ * color: 'var(--ck-highlight-marker-yellow)',
70
+ * type: 'marker'
71
+ * },
72
+ * {
73
+ * model: 'greenMarker',
74
+ * class: 'marker-green',
75
+ * title: 'Green marker',
76
+ * color: 'var(--ck-highlight-marker-green)',
77
+ * type: 'marker'
78
+ * },
79
+ * {
80
+ * model: 'pinkMarker',
81
+ * class: 'marker-pink',
82
+ * title: 'Pink marker',
83
+ * color: 'var(--ck-highlight-marker-pink)',
84
+ * type: 'marker'
85
+ * },
86
+ * {
87
+ * model: 'blueMarker',
88
+ * class: 'marker-blue',
89
+ * title: 'Blue marker',
90
+ * color: 'var(--ck-highlight-marker-blue)',
91
+ * type: 'marker'
92
+ * },
93
+ * {
94
+ * model: 'redPen',
95
+ * class: 'pen-red',
96
+ * title: 'Red pen',
97
+ * color: 'var(--ck-highlight-pen-red)',
98
+ * type: 'pen'
99
+ * },
100
+ * {
101
+ * model: 'greenPen',
102
+ * class: 'pen-green',
103
+ * title: 'Green pen',
104
+ * color: 'var(--ck-highlight-pen-green)',
105
+ * type: 'pen'
106
+ * }
107
+ * ]
108
+ * ```
109
+ *
110
+ * There are two types of highlighters available:
111
+ *
112
+ * * `'marker'` &ndash; Rendered as a `<mark>` element, styled with the `background-color`.
113
+ * * `'pen'` &ndash; Rendered as a `<mark>` element, styled with the font `color`.
114
+ *
115
+ * **Note**: The highlight feature provides a stylesheet with the CSS classes and corresponding colors defined
116
+ * as CSS variables.
117
+ *
118
+ * ```css
119
+ * :root {
120
+ * --ck-highlight-marker-yellow: #fdfd77;
121
+ * --ck-highlight-marker-green: #63f963;
122
+ * --ck-highlight-marker-pink: #fc7999;
123
+ * --ck-highlight-marker-blue: #72cdfd;
124
+ * --ck-highlight-pen-red: #e91313;
125
+ * --ck-highlight-pen-green: #118800;
126
+ * }
127
+ *
128
+ * .marker-yellow { ... }
129
+ * .marker-green { ... }
130
+ * .marker-pink { ... }
131
+ * .marker-blue { ... }
132
+ * .pen-red { ... }
133
+ * .pen-green { ... }
134
+ * ```
135
+ *
136
+ * It is possible to define the `color` property directly as `rgba(R, G, B, A)`,
137
+ * `#RRGGBB[AA]` or `hsla(H, S, L, A)`. In such situation, the color will **only** apply to the UI of
138
+ * the editor and the `<mark>` elements in the content must be styled by custom classes provided by
139
+ * a dedicated stylesheet.
140
+ *
141
+ * **Note**: It is recommended for the `color` property to correspond to the class in the content
142
+ * stylesheet because it represents the highlighter in the user interface of the editor.
143
+ *
144
+ * ```ts
145
+ * ClassicEditor
146
+ * .create( editorElement, {
147
+ * highlight: {
148
+ * options: [
149
+ * {
150
+ * model: 'pinkMarker',
151
+ * class: 'marker-pink',
152
+ * title: 'Pink Marker',
153
+ * color: 'var(--ck-highlight-marker-pink)',
154
+ * type: 'marker'
155
+ * },
156
+ * {
157
+ * model: 'redPen',
158
+ * class: 'pen-red',
159
+ * title: 'Red Pen',
160
+ * color: 'var(--ck-highlight-pen-red)',
161
+ * type: 'pen'
162
+ * },
163
+ * ]
164
+ * }
165
+ * } )
166
+ * .then( ... )
167
+ * .catch( ... );
168
+ * ```
169
+ */
170
+ options: Array<HighlightOption>;
171
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ export {};