@ckeditor/ckeditor5-code-block 41.3.0-alpha.4 → 41.3.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 (242) hide show
  1. package/build/code-block.js +2 -2
  2. package/build/translations/af.js +1 -1
  3. package/build/translations/ar.js +1 -1
  4. package/build/translations/az.js +1 -1
  5. package/build/translations/bg.js +1 -1
  6. package/build/translations/bn.js +1 -1
  7. package/build/translations/bs.js +1 -1
  8. package/build/translations/ca.js +1 -1
  9. package/build/translations/cs.js +1 -1
  10. package/build/translations/da.js +1 -1
  11. package/build/translations/de-ch.js +1 -1
  12. package/build/translations/de.js +1 -1
  13. package/build/translations/el.js +1 -1
  14. package/build/translations/en-au.js +1 -1
  15. package/build/translations/es-co.js +1 -1
  16. package/build/translations/es.js +1 -1
  17. package/build/translations/et.js +1 -1
  18. package/build/translations/fa.js +1 -1
  19. package/build/translations/fi.js +1 -1
  20. package/build/translations/fr.js +1 -1
  21. package/build/translations/gl.js +1 -1
  22. package/build/translations/he.js +1 -1
  23. package/build/translations/hi.js +1 -1
  24. package/build/translations/hr.js +1 -1
  25. package/build/translations/hu.js +1 -1
  26. package/build/translations/id.js +1 -1
  27. package/build/translations/it.js +1 -1
  28. package/build/translations/ja.js +1 -1
  29. package/build/translations/jv.js +1 -1
  30. package/build/translations/ko.js +1 -1
  31. package/build/translations/ku.js +1 -1
  32. package/build/translations/lt.js +1 -1
  33. package/build/translations/lv.js +1 -1
  34. package/build/translations/ms.js +1 -1
  35. package/build/translations/nl.js +1 -1
  36. package/build/translations/no.js +1 -1
  37. package/build/translations/pl.js +1 -1
  38. package/build/translations/pt-br.js +1 -1
  39. package/build/translations/pt.js +1 -1
  40. package/build/translations/ro.js +1 -1
  41. package/build/translations/ru.js +1 -1
  42. package/build/translations/sk.js +1 -1
  43. package/build/translations/sq.js +1 -1
  44. package/build/translations/sr-latn.js +1 -1
  45. package/build/translations/sr.js +1 -1
  46. package/build/translations/sv.js +1 -1
  47. package/build/translations/th.js +1 -1
  48. package/build/translations/tk.js +1 -1
  49. package/build/translations/tr.js +1 -1
  50. package/build/translations/ug.js +1 -1
  51. package/build/translations/uk.js +1 -1
  52. package/build/translations/ur.js +1 -1
  53. package/build/translations/uz.js +1 -1
  54. package/build/translations/vi.js +1 -1
  55. package/build/translations/zh-cn.js +1 -1
  56. package/build/translations/zh.js +1 -1
  57. package/lang/contexts.json +2 -1
  58. package/lang/translations/af.po +4 -0
  59. package/lang/translations/ar.po +4 -0
  60. package/lang/translations/az.po +4 -0
  61. package/lang/translations/bg.po +4 -0
  62. package/lang/translations/bn.po +4 -0
  63. package/lang/translations/bs.po +4 -0
  64. package/lang/translations/ca.po +4 -0
  65. package/lang/translations/cs.po +4 -0
  66. package/lang/translations/da.po +4 -0
  67. package/lang/translations/de-ch.po +4 -0
  68. package/lang/translations/de.po +4 -0
  69. package/lang/translations/el.po +4 -0
  70. package/lang/translations/en-au.po +4 -0
  71. package/lang/translations/en.po +4 -0
  72. package/lang/translations/es-co.po +4 -0
  73. package/lang/translations/es.po +4 -0
  74. package/lang/translations/et.po +4 -0
  75. package/lang/translations/fa.po +4 -0
  76. package/lang/translations/fi.po +4 -0
  77. package/lang/translations/fr.po +4 -0
  78. package/lang/translations/gl.po +4 -0
  79. package/lang/translations/he.po +4 -0
  80. package/lang/translations/hi.po +4 -0
  81. package/lang/translations/hr.po +4 -0
  82. package/lang/translations/hu.po +4 -0
  83. package/lang/translations/id.po +4 -0
  84. package/lang/translations/it.po +4 -0
  85. package/lang/translations/ja.po +4 -0
  86. package/lang/translations/jv.po +4 -0
  87. package/lang/translations/ko.po +4 -0
  88. package/lang/translations/ku.po +4 -0
  89. package/lang/translations/lt.po +4 -0
  90. package/lang/translations/lv.po +4 -0
  91. package/lang/translations/ms.po +4 -0
  92. package/lang/translations/nl.po +4 -0
  93. package/lang/translations/no.po +4 -0
  94. package/lang/translations/pl.po +4 -0
  95. package/lang/translations/pt-br.po +4 -0
  96. package/lang/translations/pt.po +4 -0
  97. package/lang/translations/ro.po +4 -0
  98. package/lang/translations/ru.po +4 -0
  99. package/lang/translations/sk.po +4 -0
  100. package/lang/translations/sq.po +4 -0
  101. package/lang/translations/sr-latn.po +4 -0
  102. package/lang/translations/sr.po +4 -0
  103. package/lang/translations/sv.po +4 -0
  104. package/lang/translations/th.po +4 -0
  105. package/lang/translations/tk.po +4 -0
  106. package/lang/translations/tr.po +4 -0
  107. package/lang/translations/ug.po +4 -0
  108. package/lang/translations/uk.po +4 -0
  109. package/lang/translations/ur.po +4 -0
  110. package/lang/translations/uz.po +4 -0
  111. package/lang/translations/vi.po +4 -0
  112. package/lang/translations/zh-cn.po +4 -0
  113. package/lang/translations/zh.po +4 -0
  114. package/package.json +2 -3
  115. package/src/codeblockui.js +34 -3
  116. package/dist/content-index.css +0 -22
  117. package/dist/editor-index.css +0 -11
  118. package/dist/index.css +0 -46
  119. package/dist/index.css.map +0 -1
  120. package/dist/translations/af.d.ts +0 -8
  121. package/dist/translations/af.js +0 -5
  122. package/dist/translations/ar.d.ts +0 -8
  123. package/dist/translations/ar.js +0 -5
  124. package/dist/translations/az.d.ts +0 -8
  125. package/dist/translations/az.js +0 -5
  126. package/dist/translations/bg.d.ts +0 -8
  127. package/dist/translations/bg.js +0 -5
  128. package/dist/translations/bn.d.ts +0 -8
  129. package/dist/translations/bn.js +0 -5
  130. package/dist/translations/bs.d.ts +0 -8
  131. package/dist/translations/bs.js +0 -5
  132. package/dist/translations/ca.d.ts +0 -8
  133. package/dist/translations/ca.js +0 -5
  134. package/dist/translations/cs.d.ts +0 -8
  135. package/dist/translations/cs.js +0 -5
  136. package/dist/translations/da.d.ts +0 -8
  137. package/dist/translations/da.js +0 -5
  138. package/dist/translations/de-ch.d.ts +0 -8
  139. package/dist/translations/de-ch.js +0 -5
  140. package/dist/translations/de.d.ts +0 -8
  141. package/dist/translations/de.js +0 -5
  142. package/dist/translations/el.d.ts +0 -8
  143. package/dist/translations/el.js +0 -5
  144. package/dist/translations/en-au.d.ts +0 -8
  145. package/dist/translations/en-au.js +0 -5
  146. package/dist/translations/en.d.ts +0 -8
  147. package/dist/translations/en.js +0 -5
  148. package/dist/translations/es-co.d.ts +0 -8
  149. package/dist/translations/es-co.js +0 -5
  150. package/dist/translations/es.d.ts +0 -8
  151. package/dist/translations/es.js +0 -5
  152. package/dist/translations/et.d.ts +0 -8
  153. package/dist/translations/et.js +0 -5
  154. package/dist/translations/fa.d.ts +0 -8
  155. package/dist/translations/fa.js +0 -5
  156. package/dist/translations/fi.d.ts +0 -8
  157. package/dist/translations/fi.js +0 -5
  158. package/dist/translations/fr.d.ts +0 -8
  159. package/dist/translations/fr.js +0 -5
  160. package/dist/translations/gl.d.ts +0 -8
  161. package/dist/translations/gl.js +0 -5
  162. package/dist/translations/he.d.ts +0 -8
  163. package/dist/translations/he.js +0 -5
  164. package/dist/translations/hi.d.ts +0 -8
  165. package/dist/translations/hi.js +0 -5
  166. package/dist/translations/hr.d.ts +0 -8
  167. package/dist/translations/hr.js +0 -5
  168. package/dist/translations/hu.d.ts +0 -8
  169. package/dist/translations/hu.js +0 -5
  170. package/dist/translations/id.d.ts +0 -8
  171. package/dist/translations/id.js +0 -5
  172. package/dist/translations/it.d.ts +0 -8
  173. package/dist/translations/it.js +0 -5
  174. package/dist/translations/ja.d.ts +0 -8
  175. package/dist/translations/ja.js +0 -5
  176. package/dist/translations/jv.d.ts +0 -8
  177. package/dist/translations/jv.js +0 -5
  178. package/dist/translations/ko.d.ts +0 -8
  179. package/dist/translations/ko.js +0 -5
  180. package/dist/translations/ku.d.ts +0 -8
  181. package/dist/translations/ku.js +0 -5
  182. package/dist/translations/lt.d.ts +0 -8
  183. package/dist/translations/lt.js +0 -5
  184. package/dist/translations/lv.d.ts +0 -8
  185. package/dist/translations/lv.js +0 -5
  186. package/dist/translations/ms.d.ts +0 -8
  187. package/dist/translations/ms.js +0 -5
  188. package/dist/translations/nl.d.ts +0 -8
  189. package/dist/translations/nl.js +0 -5
  190. package/dist/translations/no.d.ts +0 -8
  191. package/dist/translations/no.js +0 -5
  192. package/dist/translations/pl.d.ts +0 -8
  193. package/dist/translations/pl.js +0 -5
  194. package/dist/translations/pt-br.d.ts +0 -8
  195. package/dist/translations/pt-br.js +0 -5
  196. package/dist/translations/pt.d.ts +0 -8
  197. package/dist/translations/pt.js +0 -5
  198. package/dist/translations/ro.d.ts +0 -8
  199. package/dist/translations/ro.js +0 -5
  200. package/dist/translations/ru.d.ts +0 -8
  201. package/dist/translations/ru.js +0 -5
  202. package/dist/translations/sk.d.ts +0 -8
  203. package/dist/translations/sk.js +0 -5
  204. package/dist/translations/sq.d.ts +0 -8
  205. package/dist/translations/sq.js +0 -5
  206. package/dist/translations/sr-latn.d.ts +0 -8
  207. package/dist/translations/sr-latn.js +0 -5
  208. package/dist/translations/sr.d.ts +0 -8
  209. package/dist/translations/sr.js +0 -5
  210. package/dist/translations/sv.d.ts +0 -8
  211. package/dist/translations/sv.js +0 -5
  212. package/dist/translations/th.d.ts +0 -8
  213. package/dist/translations/th.js +0 -5
  214. package/dist/translations/tk.d.ts +0 -8
  215. package/dist/translations/tk.js +0 -5
  216. package/dist/translations/tr.d.ts +0 -8
  217. package/dist/translations/tr.js +0 -5
  218. package/dist/translations/ug.d.ts +0 -8
  219. package/dist/translations/ug.js +0 -5
  220. package/dist/translations/uk.d.ts +0 -8
  221. package/dist/translations/uk.js +0 -5
  222. package/dist/translations/ur.d.ts +0 -8
  223. package/dist/translations/ur.js +0 -5
  224. package/dist/translations/uz.d.ts +0 -8
  225. package/dist/translations/uz.js +0 -5
  226. package/dist/translations/vi.d.ts +0 -8
  227. package/dist/translations/vi.js +0 -5
  228. package/dist/translations/zh-cn.d.ts +0 -8
  229. package/dist/translations/zh-cn.js +0 -5
  230. package/dist/translations/zh.d.ts +0 -8
  231. package/dist/translations/zh.js +0 -5
  232. package/dist/types/augmentation.d.ts +0 -29
  233. package/dist/types/codeblock.d.ts +0 -33
  234. package/dist/types/codeblockcommand.d.ts +0 -64
  235. package/dist/types/codeblockconfig.d.ts +0 -150
  236. package/dist/types/codeblockediting.d.ts +0 -40
  237. package/dist/types/codeblockui.d.ts +0 -33
  238. package/dist/types/converters.d.ts +0 -130
  239. package/dist/types/indentcodeblockcommand.d.ts +0 -37
  240. package/dist/types/index.d.ts +0 -19
  241. package/dist/types/outdentcodeblockcommand.d.ts +0 -37
  242. package/dist/types/utils.d.ts +0 -142
@@ -1,5 +0,0 @@
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 default {"sk":{"dictionary":{"Insert code block":"Vložte blok kódu","Plain text":"Čistý text"},getPluralForm(n){return (n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n >= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);}}}
@@ -1,8 +0,0 @@
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
- import type { Translations } from 'ckeditor5';
7
- declare const translations: Translations;
8
- export default translations;
@@ -1,5 +0,0 @@
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 default {"sq":{"dictionary":{"Insert code block":"Shto bllokun e kodit","Plain text":"Teksti i thjeshtë"},getPluralForm(n){return (n != 1);}}}
@@ -1,8 +0,0 @@
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
- import type { Translations } from 'ckeditor5';
7
- declare const translations: Translations;
8
- export default translations;
@@ -1,5 +0,0 @@
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 default {"sr-latn":{"dictionary":{"Insert code block":"Dodaj blok koda","Plain text":"Običan tekst"},getPluralForm(n){return (n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);}}}
@@ -1,8 +0,0 @@
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
- import type { Translations } from 'ckeditor5';
7
- declare const translations: Translations;
8
- export default translations;
@@ -1,5 +0,0 @@
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 default {"sr":{"dictionary":{"Insert code block":"Додај блок кода","Plain text":"Обичан текст"},getPluralForm(n){return (n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);}}}
@@ -1,8 +0,0 @@
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
- import type { Translations } from 'ckeditor5';
7
- declare const translations: Translations;
8
- export default translations;
@@ -1,5 +0,0 @@
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 default {"sv":{"dictionary":{"Insert code block":"Infoga kodblock","Plain text":"Vanlig text"},getPluralForm(n){return (n != 1);}}}
@@ -1,8 +0,0 @@
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
- import type { Translations } from 'ckeditor5';
7
- declare const translations: Translations;
8
- export default translations;
@@ -1,5 +0,0 @@
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 default {"th":{"dictionary":{"Insert code block":"เพิ่มโค้ดบล็อก","Plain text":"ข้อความธรรมดา"},getPluralForm(n){return 0;}}}
@@ -1,8 +0,0 @@
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
- import type { Translations } from 'ckeditor5';
7
- declare const translations: Translations;
8
- export default translations;
@@ -1,5 +0,0 @@
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 default {"tk":{"dictionary":{"Insert code block":"Kod blogyna goýuň","Plain text":"Düz tekst"},getPluralForm(n){return (n != 1);}}}
@@ -1,8 +0,0 @@
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
- import type { Translations } from 'ckeditor5';
7
- declare const translations: Translations;
8
- export default translations;
@@ -1,5 +0,0 @@
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 default {"tr":{"dictionary":{"Insert code block":"Kod bloğu ekle","Plain text":"Düz metin"},getPluralForm(n){return (n > 1);}}}
@@ -1,8 +0,0 @@
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
- import type { Translations } from 'ckeditor5';
7
- declare const translations: Translations;
8
- export default translations;
@@ -1,5 +0,0 @@
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 default {"ug":{"dictionary":{"Insert code block":"كود بۆلىكى قىستۇر","Plain text":"ساپ تېكىست"},getPluralForm(n){return (n != 1);}}}
@@ -1,8 +0,0 @@
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
- import type { Translations } from 'ckeditor5';
7
- declare const translations: Translations;
8
- export default translations;
@@ -1,5 +0,0 @@
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 default {"uk":{"dictionary":{"Insert code block":"Вставте блок коду","Plain text":"Простий текст"},getPluralForm(n){return (n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);}}}
@@ -1,8 +0,0 @@
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
- import type { Translations } from 'ckeditor5';
7
- declare const translations: Translations;
8
- export default translations;
@@ -1,5 +0,0 @@
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 default {"ur":{"dictionary":{"Insert code block":"کوڈ خانہ نصب کیرں","Plain text":"سادہ متن"},getPluralForm(n){return (n != 1);}}}
@@ -1,8 +0,0 @@
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
- import type { Translations } from 'ckeditor5';
7
- declare const translations: Translations;
8
- export default translations;
@@ -1,5 +0,0 @@
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 default {"uz":{"dictionary":{"Insert code block":"Kodni kiritish","Plain text":"Oddiy matn"},getPluralForm(n){return 0;}}}
@@ -1,8 +0,0 @@
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
- import type { Translations } from 'ckeditor5';
7
- declare const translations: Translations;
8
- export default translations;
@@ -1,5 +0,0 @@
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 default {"vi":{"dictionary":{"Insert code block":"Chèn khối mã","Plain text":"Văn bản thuần"},getPluralForm(n){return 0;}}}
@@ -1,8 +0,0 @@
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
- import type { Translations } from 'ckeditor5';
7
- declare const translations: Translations;
8
- export default translations;
@@ -1,5 +0,0 @@
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 default {"zh-cn":{"dictionary":{"Insert code block":"插入代码块","Plain text":"纯文本"},getPluralForm(n){return 0;}}}
@@ -1,8 +0,0 @@
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
- import type { Translations } from 'ckeditor5';
7
- declare const translations: Translations;
8
- export default translations;
@@ -1,5 +0,0 @@
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 default {"zh":{"dictionary":{"Insert code block":"插入程式碼區塊","Plain text":"純文字"},getPluralForm(n){return 0;}}}
@@ -1,29 +0,0 @@
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
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
- */
9
- import type { CodeBlock, CodeBlockCommand, CodeBlockConfig, CodeBlockEditing, CodeBlockUI, IndentCodeBlockCommand, OutdentCodeBlockCommand } from './index.js';
10
- declare module '@ckeditor/ckeditor5-core' {
11
- interface EditorConfig {
12
- /**
13
- * The configuration of the {@link module:code-block/codeblock~CodeBlock} feature.
14
- *
15
- * Read more in {@link module:code-block/codeblockconfig~CodeBlockConfig}.
16
- */
17
- codeBlock?: CodeBlockConfig;
18
- }
19
- interface PluginsMap {
20
- [CodeBlock.pluginName]: CodeBlock;
21
- [CodeBlockEditing.pluginName]: CodeBlockEditing;
22
- [CodeBlockUI.pluginName]: CodeBlockUI;
23
- }
24
- interface CommandsMap {
25
- codeBlock: CodeBlockCommand;
26
- indentCodeBlock: IndentCodeBlockCommand;
27
- outdentCodeBlock: OutdentCodeBlockCommand;
28
- }
29
- }
@@ -1,33 +0,0 @@
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
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
- */
9
- /**
10
- * @module code-block/codeblock
11
- */
12
- import { Plugin } from 'ckeditor5/src/core.js';
13
- import CodeBlockEditing from './codeblockediting.js';
14
- import CodeBlockUI from './codeblockui.js';
15
- /**
16
- * The code block plugin.
17
- *
18
- * For more information about this feature check the {@glink api/code-block package page} and the
19
- * {@glink features/code-blocks code block} feature guide.
20
- *
21
- * This is a "glue" plugin that loads the {@link module:code-block/codeblockediting~CodeBlockEditing code block editing feature}
22
- * and the {@link module:code-block/codeblockui~CodeBlockUI code block UI feature}.
23
- */
24
- export default class CodeBlock extends Plugin {
25
- /**
26
- * @inheritDoc
27
- */
28
- static get requires(): readonly [typeof CodeBlockEditing, typeof CodeBlockUI];
29
- /**
30
- * @inheritDoc
31
- */
32
- static get pluginName(): "CodeBlock";
33
- }
@@ -1,64 +0,0 @@
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
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
- */
9
- import { Command, type Editor } from 'ckeditor5/src/core.js';
10
- /**
11
- * The code block command plugin.
12
- */
13
- export default class CodeBlockCommand extends Command {
14
- /**
15
- * Contains the last used language.
16
- */
17
- private _lastLanguage;
18
- /**
19
- * Contains language if any is selected, false otherwise.
20
- * @observable
21
- * @readonly
22
- */
23
- value: string | false;
24
- /**
25
- * @inheritDoc
26
- */
27
- constructor(editor: Editor);
28
- /**
29
- * @inheritDoc
30
- */
31
- refresh(): void;
32
- /**
33
- * Executes the command. When the command {@link #value is on}, all topmost code blocks within
34
- * the selection will be removed. If it is off, all selected blocks will be flattened and
35
- * wrapped by a code block.
36
- *
37
- * @fires execute
38
- * @param options Command options.
39
- * @param options.language The code block language.
40
- * @param options.forceValue If set, it will force the command behavior. If `true`, the command will apply a code block,
41
- * otherwise the command will remove the code block. If not set, the command will act basing on its current value.
42
- * @param options.usePreviousLanguageChoice If set on `true` and the `options.language` is not specified, the command
43
- * will apply the previous language (if the command was already executed) when inserting the `codeBlock` element.
44
- */
45
- execute(options?: {
46
- language?: string;
47
- forceValue?: boolean;
48
- usePreviousLanguageChoice?: boolean;
49
- }): void;
50
- /**
51
- * Checks the command's {@link #value}.
52
- *
53
- * @returns The current value.
54
- */
55
- private _getValue;
56
- /**
57
- * Checks whether the command can be enabled in the current context.
58
- *
59
- * @returns Whether the command should be enabled.
60
- */
61
- private _checkEnabled;
62
- private _applyCodeBlock;
63
- private _removeCodeBlock;
64
- }
@@ -1,150 +0,0 @@
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
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
- */
9
- /**
10
- * @module code-block/codeblockconfig
11
- */
12
- /**
13
- * The configuration of the {@link module:code-block/codeblock~CodeBlock code block feature}.
14
- *
15
- * ```ts
16
- * ClassicEditor
17
- * .create( editorElement, {
18
- * codeBlock: ... // The code block feature configuration.
19
- * } )
20
- * .then( ... )
21
- * .catch( ... );
22
- * ```
23
- *
24
- * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
25
- */
26
- export interface CodeBlockConfig {
27
- /**
28
- * The list of code languages available in the user interface to choose for a particular code block.
29
- *
30
- * The language of the code block is represented as a CSS class (by default prefixed by "language-") set on the
31
- * `<code>` element, both when editing and in the editor data. The CSS class associated with the language
32
- * can be used by third–party code syntax highlighters to detect and apply the correct highlighting.
33
- *
34
- * For instance, this language configuration:
35
- *
36
- * ```ts
37
- * ClassicEditor
38
- * .create( document.querySelector( '#editor' ), {
39
- * codeBlock: {
40
- * languages: [
41
- * // ...
42
- * { language: 'javascript', label: 'JavaScript' },
43
- * // ...
44
- * ]
45
- * }
46
- * } )
47
- * .then( ... )
48
- * .catch( ... );
49
- * ```
50
- *
51
- * will result in the following structure of JavaScript code blocks in the editor editing and data:
52
- *
53
- * ```html
54
- * <pre><code class="language-javascript">window.alert( 'Hello world!' )</code></pre>
55
- * ```
56
- *
57
- * You can customize the CSS class by specifying an optional `class` property in the language definition.
58
- * You can set **multiple classes** but **only the first one** will be used as defining language class:
59
- *
60
- * ```ts
61
- * ClassicEditor
62
- * .create( document.querySelector( '#editor' ), {
63
- * codeBlock: {
64
- * languages: [
65
- * // Do not render the CSS class for the plain text code blocks.
66
- * { language: 'plaintext', label: 'Plain text', class: '' },
67
- *
68
- * // Use the "php-code" class for PHP code blocks.
69
- * { language: 'php', label: 'PHP', class: 'php-code' },
70
- *
71
- * // Use the "js" class for JavaScript code blocks.
72
- * // Note that only the first ("js") class will determine the language of the block when loading data.
73
- * { language: 'javascript', label: 'JavaScript', class: 'js javascript js-code' },
74
- *
75
- * // Python code blocks will have the default "language-python" CSS class.
76
- * { language: 'python', label: 'Python' }
77
- * ]
78
- * }
79
- * } )
80
- * .then( ... )
81
- * .catch( ... );
82
- * ```
83
- *
84
- * The default value of the language configuration is as follows:
85
- *
86
- * ```ts
87
- * languages: [
88
- * { language: 'plaintext', label: 'Plain text' }, // The default language.
89
- * { language: 'c', label: 'C' },
90
- * { language: 'cs', label: 'C#' },
91
- * { language: 'cpp', label: 'C++' },
92
- * { language: 'css', label: 'CSS' },
93
- * { language: 'diff', label: 'Diff' },
94
- * { language: 'html', label: 'HTML' },
95
- * { language: 'java', label: 'Java' },
96
- * { language: 'javascript', label: 'JavaScript' },
97
- * { language: 'php', label: 'PHP' },
98
- * { language: 'python', label: 'Python' },
99
- * { language: 'ruby', label: 'Ruby' },
100
- * { language: 'typescript', label: 'TypeScript' },
101
- * { language: 'xml', label: 'XML' }
102
- * ]
103
- * ```
104
- *
105
- * **Note**: The first language defined in the configuration is considered the default one. This means it will be
106
- * applied to code blocks loaded from the data that have no CSS `class` specified (or no matching `class` in the configuration).
107
- * It will also be used when creating new code blocks using the main UI button. By default it is "Plain text".
108
- */
109
- languages?: Array<CodeBlockLanguageDefinition>;
110
- /**
111
- * A sequence of characters inserted or removed from the code block lines when its indentation
112
- * is changed by the user, for instance, using <kbd>Tab</kbd> and <kbd>Shift</kbd>+<kbd>Tab</kbd> keys.
113
- *
114
- * The default value is a single tab character (" ", `\u0009` in Unicode).
115
- *
116
- * This configuration is used by `indentCodeBlock` and `outdentCodeBlock` commands (instances of
117
- * {@link module:code-block/indentcodeblockcommand~IndentCodeBlockCommand}).
118
- *
119
- * **Note**: Setting this configuration to `false` will disable the code block indentation commands
120
- * and associated keystrokes.
121
- *
122
- */
123
- indentSequence?: string;
124
- }
125
- /**
126
- * The code block language descriptor. See {@link module:code-block/codeblockconfig~CodeBlockConfig#languages} to learn more.
127
- *
128
- * ```ts
129
- * {
130
- * language: 'javascript',
131
- * label: 'JavaScript'
132
- * }
133
- * ```
134
- */
135
- export interface CodeBlockLanguageDefinition {
136
- /**
137
- * The name of the language that will be stored in the model attribute. Also, when `class`
138
- * is not specified, it will be used to create the CSS class associated with the language (prefixed by "language-").
139
- */
140
- language: string;
141
- /**
142
- * The human–readable label associated with the language and displayed in the UI.
143
- */
144
- label: string;
145
- /**
146
- * The CSS class associated with the language. When not specified the `language`
147
- * property is used to create a class prefixed by "language-".
148
- */
149
- class?: string;
150
- }
@@ -1,40 +0,0 @@
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
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
- */
9
- /**
10
- * @module code-block/codeblockediting
11
- */
12
- import { Plugin, type Editor } from 'ckeditor5/src/core.js';
13
- import { ShiftEnter } from 'ckeditor5/src/enter.js';
14
- /**
15
- * The editing part of the code block feature.
16
- *
17
- * Introduces the `'codeBlock'` command and the `'codeBlock'` model element.
18
- */
19
- export default class CodeBlockEditing extends Plugin {
20
- /**
21
- * @inheritDoc
22
- */
23
- static get pluginName(): "CodeBlockEditing";
24
- /**
25
- * @inheritDoc
26
- */
27
- static get requires(): readonly [typeof ShiftEnter];
28
- /**
29
- * @inheritDoc
30
- */
31
- constructor(editor: Editor);
32
- /**
33
- * @inheritDoc
34
- */
35
- init(): void;
36
- /**
37
- * @inheritDoc
38
- */
39
- afterInit(): void;
40
- }
@@ -1,33 +0,0 @@
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
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
- */
9
- /**
10
- * @module code-block/codeblockui
11
- */
12
- import { Plugin } from 'ckeditor5/src/core.js';
13
- import '../theme/codeblock.css';
14
- /**
15
- * The code block UI plugin.
16
- *
17
- * Introduces the `'codeBlock'` dropdown.
18
- */
19
- export default class CodeBlockUI extends Plugin {
20
- /**
21
- * @inheritDoc
22
- */
23
- static get pluginName(): "CodeBlockUI";
24
- /**
25
- * @inheritDoc
26
- */
27
- init(): void;
28
- /**
29
- * A helper returning a collection of the `codeBlock` dropdown items representing languages
30
- * available for the user to choose from.
31
- */
32
- private _getLanguageListItemDefinitions;
33
- }