@ckeditor/ckeditor5-block-quote 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 (346) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/LICENSE.md +17 -0
  3. package/README.md +26 -0
  4. package/build/block-quote.js +5 -0
  5. package/build/translations/af.js +1 -0
  6. package/build/translations/ar.js +1 -0
  7. package/build/translations/az.js +1 -0
  8. package/build/translations/bg.js +1 -0
  9. package/build/translations/bn.js +1 -0
  10. package/build/translations/bs.js +1 -0
  11. package/build/translations/ca.js +1 -0
  12. package/build/translations/cs.js +1 -0
  13. package/build/translations/da.js +1 -0
  14. package/build/translations/de-ch.js +1 -0
  15. package/build/translations/de.js +1 -0
  16. package/build/translations/el.js +1 -0
  17. package/build/translations/en-au.js +1 -0
  18. package/build/translations/en-gb.js +1 -0
  19. package/build/translations/es-co.js +1 -0
  20. package/build/translations/es.js +1 -0
  21. package/build/translations/et.js +1 -0
  22. package/build/translations/eu.js +1 -0
  23. package/build/translations/fa.js +1 -0
  24. package/build/translations/fi.js +1 -0
  25. package/build/translations/fr.js +1 -0
  26. package/build/translations/gl.js +1 -0
  27. package/build/translations/gu.js +1 -0
  28. package/build/translations/he.js +1 -0
  29. package/build/translations/hi.js +1 -0
  30. package/build/translations/hr.js +1 -0
  31. package/build/translations/hu.js +1 -0
  32. package/build/translations/id.js +1 -0
  33. package/build/translations/it.js +1 -0
  34. package/build/translations/ja.js +1 -0
  35. package/build/translations/km.js +1 -0
  36. package/build/translations/kn.js +1 -0
  37. package/build/translations/ko.js +1 -0
  38. package/build/translations/ku.js +1 -0
  39. package/build/translations/lt.js +1 -0
  40. package/build/translations/lv.js +1 -0
  41. package/build/translations/ms.js +1 -0
  42. package/build/translations/nb.js +1 -0
  43. package/build/translations/ne.js +1 -0
  44. package/build/translations/nl.js +1 -0
  45. package/build/translations/no.js +1 -0
  46. package/build/translations/pl.js +1 -0
  47. package/build/translations/pt-br.js +1 -0
  48. package/build/translations/pt.js +1 -0
  49. package/build/translations/ro.js +1 -0
  50. package/build/translations/ru.js +1 -0
  51. package/build/translations/sk.js +1 -0
  52. package/build/translations/sl.js +1 -0
  53. package/build/translations/sq.js +1 -0
  54. package/build/translations/sr-latn.js +1 -0
  55. package/build/translations/sr.js +1 -0
  56. package/build/translations/sv.js +1 -0
  57. package/build/translations/th.js +1 -0
  58. package/build/translations/tk.js +1 -0
  59. package/build/translations/tr.js +1 -0
  60. package/build/translations/ug.js +1 -0
  61. package/build/translations/uk.js +1 -0
  62. package/build/translations/ur.js +1 -0
  63. package/build/translations/uz.js +1 -0
  64. package/build/translations/vi.js +1 -0
  65. package/build/translations/zh-cn.js +1 -0
  66. package/build/translations/zh.js +1 -0
  67. package/ckeditor5-metadata.json +23 -0
  68. package/dist/augmentation.d.ts +19 -0
  69. package/dist/blockquote.d.ts +38 -0
  70. package/dist/blockquotecommand.d.ts +65 -0
  71. package/dist/blockquoteediting.d.ts +39 -0
  72. package/dist/blockquoteui.d.ts +38 -0
  73. package/dist/index-content.css +19 -0
  74. package/dist/index-editor.css +4 -0
  75. package/dist/index.css +29 -0
  76. package/dist/index.css.map +1 -0
  77. package/dist/index.d.ts +16 -0
  78. package/dist/index.js +373 -0
  79. package/dist/index.js.map +1 -0
  80. package/dist/translations/af.d.ts +8 -0
  81. package/dist/translations/af.js +5 -0
  82. package/dist/translations/af.umd.js +11 -0
  83. package/dist/translations/ar.d.ts +8 -0
  84. package/dist/translations/ar.js +5 -0
  85. package/dist/translations/ar.umd.js +11 -0
  86. package/dist/translations/az.d.ts +8 -0
  87. package/dist/translations/az.js +5 -0
  88. package/dist/translations/az.umd.js +11 -0
  89. package/dist/translations/bg.d.ts +8 -0
  90. package/dist/translations/bg.js +5 -0
  91. package/dist/translations/bg.umd.js +11 -0
  92. package/dist/translations/bn.d.ts +8 -0
  93. package/dist/translations/bn.js +5 -0
  94. package/dist/translations/bn.umd.js +11 -0
  95. package/dist/translations/bs.d.ts +8 -0
  96. package/dist/translations/bs.js +5 -0
  97. package/dist/translations/bs.umd.js +11 -0
  98. package/dist/translations/ca.d.ts +8 -0
  99. package/dist/translations/ca.js +5 -0
  100. package/dist/translations/ca.umd.js +11 -0
  101. package/dist/translations/cs.d.ts +8 -0
  102. package/dist/translations/cs.js +5 -0
  103. package/dist/translations/cs.umd.js +11 -0
  104. package/dist/translations/da.d.ts +8 -0
  105. package/dist/translations/da.js +5 -0
  106. package/dist/translations/da.umd.js +11 -0
  107. package/dist/translations/de-ch.d.ts +8 -0
  108. package/dist/translations/de-ch.js +5 -0
  109. package/dist/translations/de-ch.umd.js +11 -0
  110. package/dist/translations/de.d.ts +8 -0
  111. package/dist/translations/de.js +5 -0
  112. package/dist/translations/de.umd.js +11 -0
  113. package/dist/translations/el.d.ts +8 -0
  114. package/dist/translations/el.js +5 -0
  115. package/dist/translations/el.umd.js +11 -0
  116. package/dist/translations/en-au.d.ts +8 -0
  117. package/dist/translations/en-au.js +5 -0
  118. package/dist/translations/en-au.umd.js +11 -0
  119. package/dist/translations/en-gb.d.ts +8 -0
  120. package/dist/translations/en-gb.js +5 -0
  121. package/dist/translations/en-gb.umd.js +11 -0
  122. package/dist/translations/en.d.ts +8 -0
  123. package/dist/translations/en.js +5 -0
  124. package/dist/translations/en.umd.js +11 -0
  125. package/dist/translations/es-co.d.ts +8 -0
  126. package/dist/translations/es-co.js +5 -0
  127. package/dist/translations/es-co.umd.js +11 -0
  128. package/dist/translations/es.d.ts +8 -0
  129. package/dist/translations/es.js +5 -0
  130. package/dist/translations/es.umd.js +11 -0
  131. package/dist/translations/et.d.ts +8 -0
  132. package/dist/translations/et.js +5 -0
  133. package/dist/translations/et.umd.js +11 -0
  134. package/dist/translations/eu.d.ts +8 -0
  135. package/dist/translations/eu.js +5 -0
  136. package/dist/translations/eu.umd.js +11 -0
  137. package/dist/translations/fa.d.ts +8 -0
  138. package/dist/translations/fa.js +5 -0
  139. package/dist/translations/fa.umd.js +11 -0
  140. package/dist/translations/fi.d.ts +8 -0
  141. package/dist/translations/fi.js +5 -0
  142. package/dist/translations/fi.umd.js +11 -0
  143. package/dist/translations/fr.d.ts +8 -0
  144. package/dist/translations/fr.js +5 -0
  145. package/dist/translations/fr.umd.js +11 -0
  146. package/dist/translations/gl.d.ts +8 -0
  147. package/dist/translations/gl.js +5 -0
  148. package/dist/translations/gl.umd.js +11 -0
  149. package/dist/translations/gu.d.ts +8 -0
  150. package/dist/translations/gu.js +5 -0
  151. package/dist/translations/gu.umd.js +11 -0
  152. package/dist/translations/he.d.ts +8 -0
  153. package/dist/translations/he.js +5 -0
  154. package/dist/translations/he.umd.js +11 -0
  155. package/dist/translations/hi.d.ts +8 -0
  156. package/dist/translations/hi.js +5 -0
  157. package/dist/translations/hi.umd.js +11 -0
  158. package/dist/translations/hr.d.ts +8 -0
  159. package/dist/translations/hr.js +5 -0
  160. package/dist/translations/hr.umd.js +11 -0
  161. package/dist/translations/hu.d.ts +8 -0
  162. package/dist/translations/hu.js +5 -0
  163. package/dist/translations/hu.umd.js +11 -0
  164. package/dist/translations/id.d.ts +8 -0
  165. package/dist/translations/id.js +5 -0
  166. package/dist/translations/id.umd.js +11 -0
  167. package/dist/translations/it.d.ts +8 -0
  168. package/dist/translations/it.js +5 -0
  169. package/dist/translations/it.umd.js +11 -0
  170. package/dist/translations/ja.d.ts +8 -0
  171. package/dist/translations/ja.js +5 -0
  172. package/dist/translations/ja.umd.js +11 -0
  173. package/dist/translations/km.d.ts +8 -0
  174. package/dist/translations/km.js +5 -0
  175. package/dist/translations/km.umd.js +11 -0
  176. package/dist/translations/kn.d.ts +8 -0
  177. package/dist/translations/kn.js +5 -0
  178. package/dist/translations/kn.umd.js +11 -0
  179. package/dist/translations/ko.d.ts +8 -0
  180. package/dist/translations/ko.js +5 -0
  181. package/dist/translations/ko.umd.js +11 -0
  182. package/dist/translations/ku.d.ts +8 -0
  183. package/dist/translations/ku.js +5 -0
  184. package/dist/translations/ku.umd.js +11 -0
  185. package/dist/translations/lt.d.ts +8 -0
  186. package/dist/translations/lt.js +5 -0
  187. package/dist/translations/lt.umd.js +11 -0
  188. package/dist/translations/lv.d.ts +8 -0
  189. package/dist/translations/lv.js +5 -0
  190. package/dist/translations/lv.umd.js +11 -0
  191. package/dist/translations/ms.d.ts +8 -0
  192. package/dist/translations/ms.js +5 -0
  193. package/dist/translations/ms.umd.js +11 -0
  194. package/dist/translations/nb.d.ts +8 -0
  195. package/dist/translations/nb.js +5 -0
  196. package/dist/translations/nb.umd.js +11 -0
  197. package/dist/translations/ne.d.ts +8 -0
  198. package/dist/translations/ne.js +5 -0
  199. package/dist/translations/ne.umd.js +11 -0
  200. package/dist/translations/nl.d.ts +8 -0
  201. package/dist/translations/nl.js +5 -0
  202. package/dist/translations/nl.umd.js +11 -0
  203. package/dist/translations/no.d.ts +8 -0
  204. package/dist/translations/no.js +5 -0
  205. package/dist/translations/no.umd.js +11 -0
  206. package/dist/translations/pl.d.ts +8 -0
  207. package/dist/translations/pl.js +5 -0
  208. package/dist/translations/pl.umd.js +11 -0
  209. package/dist/translations/pt-br.d.ts +8 -0
  210. package/dist/translations/pt-br.js +5 -0
  211. package/dist/translations/pt-br.umd.js +11 -0
  212. package/dist/translations/pt.d.ts +8 -0
  213. package/dist/translations/pt.js +5 -0
  214. package/dist/translations/pt.umd.js +11 -0
  215. package/dist/translations/ro.d.ts +8 -0
  216. package/dist/translations/ro.js +5 -0
  217. package/dist/translations/ro.umd.js +11 -0
  218. package/dist/translations/ru.d.ts +8 -0
  219. package/dist/translations/ru.js +5 -0
  220. package/dist/translations/ru.umd.js +11 -0
  221. package/dist/translations/sk.d.ts +8 -0
  222. package/dist/translations/sk.js +5 -0
  223. package/dist/translations/sk.umd.js +11 -0
  224. package/dist/translations/sl.d.ts +8 -0
  225. package/dist/translations/sl.js +5 -0
  226. package/dist/translations/sl.umd.js +11 -0
  227. package/dist/translations/sq.d.ts +8 -0
  228. package/dist/translations/sq.js +5 -0
  229. package/dist/translations/sq.umd.js +11 -0
  230. package/dist/translations/sr-latn.d.ts +8 -0
  231. package/dist/translations/sr-latn.js +5 -0
  232. package/dist/translations/sr-latn.umd.js +11 -0
  233. package/dist/translations/sr.d.ts +8 -0
  234. package/dist/translations/sr.js +5 -0
  235. package/dist/translations/sr.umd.js +11 -0
  236. package/dist/translations/sv.d.ts +8 -0
  237. package/dist/translations/sv.js +5 -0
  238. package/dist/translations/sv.umd.js +11 -0
  239. package/dist/translations/th.d.ts +8 -0
  240. package/dist/translations/th.js +5 -0
  241. package/dist/translations/th.umd.js +11 -0
  242. package/dist/translations/tk.d.ts +8 -0
  243. package/dist/translations/tk.js +5 -0
  244. package/dist/translations/tk.umd.js +11 -0
  245. package/dist/translations/tr.d.ts +8 -0
  246. package/dist/translations/tr.js +5 -0
  247. package/dist/translations/tr.umd.js +11 -0
  248. package/dist/translations/ug.d.ts +8 -0
  249. package/dist/translations/ug.js +5 -0
  250. package/dist/translations/ug.umd.js +11 -0
  251. package/dist/translations/uk.d.ts +8 -0
  252. package/dist/translations/uk.js +5 -0
  253. package/dist/translations/uk.umd.js +11 -0
  254. package/dist/translations/ur.d.ts +8 -0
  255. package/dist/translations/ur.js +5 -0
  256. package/dist/translations/ur.umd.js +11 -0
  257. package/dist/translations/uz.d.ts +8 -0
  258. package/dist/translations/uz.js +5 -0
  259. package/dist/translations/uz.umd.js +11 -0
  260. package/dist/translations/vi.d.ts +8 -0
  261. package/dist/translations/vi.js +5 -0
  262. package/dist/translations/vi.umd.js +11 -0
  263. package/dist/translations/zh-cn.d.ts +8 -0
  264. package/dist/translations/zh-cn.js +5 -0
  265. package/dist/translations/zh-cn.umd.js +11 -0
  266. package/dist/translations/zh.d.ts +8 -0
  267. package/dist/translations/zh.js +5 -0
  268. package/dist/translations/zh.umd.js +11 -0
  269. package/lang/contexts.json +3 -0
  270. package/lang/translations/af.po +22 -0
  271. package/lang/translations/ar.po +22 -0
  272. package/lang/translations/az.po +22 -0
  273. package/lang/translations/bg.po +22 -0
  274. package/lang/translations/bn.po +22 -0
  275. package/lang/translations/bs.po +22 -0
  276. package/lang/translations/ca.po +22 -0
  277. package/lang/translations/cs.po +22 -0
  278. package/lang/translations/da.po +22 -0
  279. package/lang/translations/de-ch.po +22 -0
  280. package/lang/translations/de.po +22 -0
  281. package/lang/translations/el.po +22 -0
  282. package/lang/translations/en-au.po +22 -0
  283. package/lang/translations/en-gb.po +22 -0
  284. package/lang/translations/en.po +22 -0
  285. package/lang/translations/es-co.po +22 -0
  286. package/lang/translations/es.po +22 -0
  287. package/lang/translations/et.po +22 -0
  288. package/lang/translations/eu.po +22 -0
  289. package/lang/translations/fa.po +22 -0
  290. package/lang/translations/fi.po +22 -0
  291. package/lang/translations/fr.po +22 -0
  292. package/lang/translations/gl.po +22 -0
  293. package/lang/translations/gu.po +22 -0
  294. package/lang/translations/he.po +22 -0
  295. package/lang/translations/hi.po +22 -0
  296. package/lang/translations/hr.po +22 -0
  297. package/lang/translations/hu.po +22 -0
  298. package/lang/translations/id.po +22 -0
  299. package/lang/translations/it.po +22 -0
  300. package/lang/translations/ja.po +22 -0
  301. package/lang/translations/km.po +22 -0
  302. package/lang/translations/kn.po +22 -0
  303. package/lang/translations/ko.po +22 -0
  304. package/lang/translations/ku.po +22 -0
  305. package/lang/translations/lt.po +22 -0
  306. package/lang/translations/lv.po +22 -0
  307. package/lang/translations/ms.po +22 -0
  308. package/lang/translations/nb.po +22 -0
  309. package/lang/translations/ne.po +22 -0
  310. package/lang/translations/nl.po +22 -0
  311. package/lang/translations/no.po +22 -0
  312. package/lang/translations/pl.po +22 -0
  313. package/lang/translations/pt-br.po +22 -0
  314. package/lang/translations/pt.po +22 -0
  315. package/lang/translations/ro.po +22 -0
  316. package/lang/translations/ru.po +22 -0
  317. package/lang/translations/sk.po +22 -0
  318. package/lang/translations/sl.po +22 -0
  319. package/lang/translations/sq.po +22 -0
  320. package/lang/translations/sr-latn.po +22 -0
  321. package/lang/translations/sr.po +22 -0
  322. package/lang/translations/sv.po +22 -0
  323. package/lang/translations/th.po +22 -0
  324. package/lang/translations/tk.po +22 -0
  325. package/lang/translations/tr.po +22 -0
  326. package/lang/translations/ug.po +22 -0
  327. package/lang/translations/uk.po +22 -0
  328. package/lang/translations/ur.po +22 -0
  329. package/lang/translations/uz.po +22 -0
  330. package/lang/translations/vi.po +22 -0
  331. package/lang/translations/zh-cn.po +22 -0
  332. package/lang/translations/zh.po +22 -0
  333. package/package.json +43 -0
  334. package/src/augmentation.d.ts +15 -0
  335. package/src/augmentation.js +5 -0
  336. package/src/blockquote.d.ts +34 -0
  337. package/src/blockquote.js +40 -0
  338. package/src/blockquotecommand.d.ts +61 -0
  339. package/src/blockquotecommand.js +172 -0
  340. package/src/blockquoteediting.d.ts +35 -0
  341. package/src/blockquoteediting.js +124 -0
  342. package/src/blockquoteui.d.ts +34 -0
  343. package/src/blockquoteui.js +74 -0
  344. package/src/index.d.ts +12 -0
  345. package/src/index.js +11 -0
  346. package/theme/blockquote.css +23 -0
@@ -0,0 +1,22 @@
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: Uyghur (https://app.transifex.com/ckeditor/teams/11143/ug/)\n"
16
+ "Language: ug\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+ "Content-Type: text/plain; charset=UTF-8\n"
19
+
20
+ msgctxt "Toolbar button tooltip for the Block quote feature."
21
+ msgid "Block quote"
22
+ msgstr "نەقىل"
@@ -0,0 +1,22 @@
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: Ukrainian (https://app.transifex.com/ckeditor/teams/11143/uk/)\n"
16
+ "Language: uk\n"
17
+ "Plural-Forms: nplurals=4; plural=(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);\n"
18
+ "Content-Type: text/plain; charset=UTF-8\n"
19
+
20
+ msgctxt "Toolbar button tooltip for the Block quote feature."
21
+ msgid "Block quote"
22
+ msgstr "Цитата"
@@ -0,0 +1,22 @@
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: Urdu (https://app.transifex.com/ckeditor/teams/11143/ur/)\n"
16
+ "Language: ur\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+ "Content-Type: text/plain; charset=UTF-8\n"
19
+
20
+ msgctxt "Toolbar button tooltip for the Block quote feature."
21
+ msgid "Block quote"
22
+ msgstr "خانہ اقتباس"
@@ -0,0 +1,22 @@
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 the Block quote feature."
21
+ msgid "Block quote"
22
+ msgstr "Iqtibos"
@@ -0,0 +1,22 @@
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 the Block quote feature."
21
+ msgid "Block quote"
22
+ msgstr "Trích dẫn"
@@ -0,0 +1,22 @@
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 the Block quote feature."
21
+ msgid "Block quote"
22
+ msgstr "块引用"
@@ -0,0 +1,22 @@
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 the Block quote feature."
21
+ msgid "Block quote"
22
+ msgstr "段落引用"
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@ckeditor/ckeditor5-block-quote",
3
+ "version": "0.0.0-internal-20241017.0",
4
+ "description": "Block quote 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-enter": "0.0.0-internal-20241017.0",
18
+ "@ckeditor/ckeditor5-typing": "0.0.0-internal-20241017.0",
19
+ "@ckeditor/ckeditor5-ui": "0.0.0-internal-20241017.0",
20
+ "@ckeditor/ckeditor5-utils": "0.0.0-internal-20241017.0",
21
+ "ckeditor5": "0.0.0-internal-20241017.0"
22
+ },
23
+ "author": "CKSource (http://cksource.com/)",
24
+ "license": "GPL-2.0-or-later",
25
+ "homepage": "https://ckeditor.com/ckeditor-5",
26
+ "bugs": "https://github.com/ckeditor/ckeditor5/issues",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "https://github.com/ckeditor/ckeditor5.git",
30
+ "directory": "packages/ckeditor5-block-quote"
31
+ },
32
+ "files": [
33
+ "dist",
34
+ "lang",
35
+ "src/**/*.js",
36
+ "src/**/*.d.ts",
37
+ "theme",
38
+ "build",
39
+ "ckeditor5-metadata.json",
40
+ "CHANGELOG.md"
41
+ ],
42
+ "types": "src/index.d.ts"
43
+ }
@@ -0,0 +1,15 @@
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 { BlockQuote, BlockQuoteCommand, BlockQuoteEditing, BlockQuoteUI } from './index.js';
6
+ declare module '@ckeditor/ckeditor5-core' {
7
+ interface PluginsMap {
8
+ [BlockQuote.pluginName]: BlockQuote;
9
+ [BlockQuoteEditing.pluginName]: BlockQuoteEditing;
10
+ [BlockQuoteUI.pluginName]: BlockQuoteUI;
11
+ }
12
+ interface CommandsMap {
13
+ blockQuote: BlockQuoteCommand;
14
+ }
15
+ }
@@ -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,34 @@
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 block-quote/blockquote
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import BlockQuoteEditing from './blockquoteediting.js';
10
+ import BlockQuoteUI from './blockquoteui.js';
11
+ /**
12
+ * The block quote plugin.
13
+ *
14
+ * For more information about this feature check the {@glink api/block-quote package page}.
15
+ *
16
+ * This is a "glue" plugin which loads the {@link module:block-quote/blockquoteediting~BlockQuoteEditing block quote editing feature}
17
+ * and {@link module:block-quote/blockquoteui~BlockQuoteUI block quote UI feature}.
18
+ *
19
+ * @extends module:core/plugin~Plugin
20
+ */
21
+ export default class BlockQuote extends Plugin {
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get requires(): readonly [typeof BlockQuoteEditing, typeof BlockQuoteUI];
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static get pluginName(): "BlockQuote";
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ static get isOfficialPlugin(): true;
34
+ }
@@ -0,0 +1,40 @@
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 block-quote/blockquote
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import BlockQuoteEditing from './blockquoteediting.js';
10
+ import BlockQuoteUI from './blockquoteui.js';
11
+ /**
12
+ * The block quote plugin.
13
+ *
14
+ * For more information about this feature check the {@glink api/block-quote package page}.
15
+ *
16
+ * This is a "glue" plugin which loads the {@link module:block-quote/blockquoteediting~BlockQuoteEditing block quote editing feature}
17
+ * and {@link module:block-quote/blockquoteui~BlockQuoteUI block quote UI feature}.
18
+ *
19
+ * @extends module:core/plugin~Plugin
20
+ */
21
+ export default class BlockQuote extends Plugin {
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get requires() {
26
+ return [BlockQuoteEditing, BlockQuoteUI];
27
+ }
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ static get pluginName() {
32
+ return 'BlockQuote';
33
+ }
34
+ /**
35
+ * @inheritDoc
36
+ */
37
+ static get isOfficialPlugin() {
38
+ return true;
39
+ }
40
+ }
@@ -0,0 +1,61 @@
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 block-quote/blockquotecommand
7
+ */
8
+ import { Command } from 'ckeditor5/src/core.js';
9
+ /**
10
+ * The block quote command plugin.
11
+ *
12
+ * @extends module:core/command~Command
13
+ */
14
+ export default class BlockQuoteCommand extends Command {
15
+ /**
16
+ * Whether the selection starts in a block quote.
17
+ *
18
+ * @observable
19
+ * @readonly
20
+ */
21
+ value: boolean;
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ refresh(): void;
26
+ /**
27
+ * Executes the command. When the command {@link #value is on}, all top-most block quotes within
28
+ * the selection will be removed. If it is off, all selected blocks will be wrapped with
29
+ * a block quote.
30
+ *
31
+ * @fires execute
32
+ * @param options Command options.
33
+ * @param options.forceValue If set, it will force the command behavior. If `true`, the command will apply a block quote,
34
+ * otherwise the command will remove the block quote. If not set, the command will act basing on its current value.
35
+ */
36
+ execute(options?: {
37
+ forceValue?: boolean;
38
+ }): void;
39
+ /**
40
+ * Checks the command's {@link #value}.
41
+ */
42
+ private _getValue;
43
+ /**
44
+ * Checks whether the command can be enabled in the current context.
45
+ *
46
+ * @returns Whether the command should be enabled.
47
+ */
48
+ private _checkEnabled;
49
+ /**
50
+ * Removes the quote from given blocks.
51
+ *
52
+ * If blocks which are supposed to be "unquoted" are in the middle of a quote,
53
+ * start it or end it, then the quote will be split (if needed) and the blocks
54
+ * will be moved out of it, so other quoted blocks remained quoted.
55
+ */
56
+ private _removeQuote;
57
+ /**
58
+ * Applies the quote to given blocks.
59
+ */
60
+ private _applyQuote;
61
+ }
@@ -0,0 +1,172 @@
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 block-quote/blockquotecommand
7
+ */
8
+ import { Command } from 'ckeditor5/src/core.js';
9
+ import { first } from 'ckeditor5/src/utils.js';
10
+ /**
11
+ * The block quote command plugin.
12
+ *
13
+ * @extends module:core/command~Command
14
+ */
15
+ export default class BlockQuoteCommand extends Command {
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ refresh() {
20
+ this.value = this._getValue();
21
+ this.isEnabled = this._checkEnabled();
22
+ }
23
+ /**
24
+ * Executes the command. When the command {@link #value is on}, all top-most block quotes within
25
+ * the selection will be removed. If it is off, all selected blocks will be wrapped with
26
+ * a block quote.
27
+ *
28
+ * @fires execute
29
+ * @param options Command options.
30
+ * @param options.forceValue If set, it will force the command behavior. If `true`, the command will apply a block quote,
31
+ * otherwise the command will remove the block quote. If not set, the command will act basing on its current value.
32
+ */
33
+ execute(options = {}) {
34
+ const model = this.editor.model;
35
+ const schema = model.schema;
36
+ const selection = model.document.selection;
37
+ const blocks = Array.from(selection.getSelectedBlocks());
38
+ const value = (options.forceValue === undefined) ? !this.value : options.forceValue;
39
+ model.change(writer => {
40
+ if (!value) {
41
+ this._removeQuote(writer, blocks.filter(findQuote));
42
+ }
43
+ else {
44
+ const blocksToQuote = blocks.filter(block => {
45
+ // Already quoted blocks needs to be considered while quoting too
46
+ // in order to reuse their <bQ> elements.
47
+ return findQuote(block) || checkCanBeQuoted(schema, block);
48
+ });
49
+ this._applyQuote(writer, blocksToQuote);
50
+ }
51
+ });
52
+ }
53
+ /**
54
+ * Checks the command's {@link #value}.
55
+ */
56
+ _getValue() {
57
+ const selection = this.editor.model.document.selection;
58
+ const firstBlock = first(selection.getSelectedBlocks());
59
+ // In the current implementation, the block quote must be an immediate parent of a block element.
60
+ return !!(firstBlock && findQuote(firstBlock));
61
+ }
62
+ /**
63
+ * Checks whether the command can be enabled in the current context.
64
+ *
65
+ * @returns Whether the command should be enabled.
66
+ */
67
+ _checkEnabled() {
68
+ if (this.value) {
69
+ return true;
70
+ }
71
+ const selection = this.editor.model.document.selection;
72
+ const schema = this.editor.model.schema;
73
+ const firstBlock = first(selection.getSelectedBlocks());
74
+ if (!firstBlock) {
75
+ return false;
76
+ }
77
+ return checkCanBeQuoted(schema, firstBlock);
78
+ }
79
+ /**
80
+ * Removes the quote from given blocks.
81
+ *
82
+ * If blocks which are supposed to be "unquoted" are in the middle of a quote,
83
+ * start it or end it, then the quote will be split (if needed) and the blocks
84
+ * will be moved out of it, so other quoted blocks remained quoted.
85
+ */
86
+ _removeQuote(writer, blocks) {
87
+ // Unquote all groups of block. Iterate in the reverse order to not break following ranges.
88
+ getRangesOfBlockGroups(writer, blocks).reverse().forEach(groupRange => {
89
+ if (groupRange.start.isAtStart && groupRange.end.isAtEnd) {
90
+ writer.unwrap(groupRange.start.parent);
91
+ return;
92
+ }
93
+ // The group of blocks are at the beginning of an <bQ> so let's move them left (out of the <bQ>).
94
+ if (groupRange.start.isAtStart) {
95
+ const positionBefore = writer.createPositionBefore(groupRange.start.parent);
96
+ writer.move(groupRange, positionBefore);
97
+ return;
98
+ }
99
+ // The blocks are in the middle of an <bQ> so we need to split the <bQ> after the last block
100
+ // so we move the items there.
101
+ if (!groupRange.end.isAtEnd) {
102
+ writer.split(groupRange.end);
103
+ }
104
+ // Now we are sure that groupRange.end.isAtEnd is true, so let's move the blocks right.
105
+ const positionAfter = writer.createPositionAfter(groupRange.end.parent);
106
+ writer.move(groupRange, positionAfter);
107
+ });
108
+ }
109
+ /**
110
+ * Applies the quote to given blocks.
111
+ */
112
+ _applyQuote(writer, blocks) {
113
+ const quotesToMerge = [];
114
+ // Quote all groups of block. Iterate in the reverse order to not break following ranges.
115
+ getRangesOfBlockGroups(writer, blocks).reverse().forEach(groupRange => {
116
+ let quote = findQuote(groupRange.start);
117
+ if (!quote) {
118
+ quote = writer.createElement('blockQuote');
119
+ writer.wrap(groupRange, quote);
120
+ }
121
+ quotesToMerge.push(quote);
122
+ });
123
+ // Merge subsequent <bQ> elements. Reverse the order again because this time we want to go through
124
+ // the <bQ> elements in the source order (due to how merge works – it moves the right element's content
125
+ // to the first element and removes the right one. Since we may need to merge a couple of subsequent `<bQ>` elements
126
+ // we want to keep the reference to the first (furthest left) one.
127
+ quotesToMerge.reverse().reduce((currentQuote, nextQuote) => {
128
+ if (currentQuote.nextSibling == nextQuote) {
129
+ writer.merge(writer.createPositionAfter(currentQuote));
130
+ return currentQuote;
131
+ }
132
+ return nextQuote;
133
+ });
134
+ }
135
+ }
136
+ function findQuote(elementOrPosition) {
137
+ return elementOrPosition.parent.name == 'blockQuote' ? elementOrPosition.parent : null;
138
+ }
139
+ /**
140
+ * Returns a minimal array of ranges containing groups of subsequent blocks.
141
+ *
142
+ * content: abcdefgh
143
+ * blocks: [ a, b, d, f, g, h ]
144
+ * output ranges: [ab]c[d]e[fgh]
145
+ */
146
+ function getRangesOfBlockGroups(writer, blocks) {
147
+ let startPosition;
148
+ let i = 0;
149
+ const ranges = [];
150
+ while (i < blocks.length) {
151
+ const block = blocks[i];
152
+ const nextBlock = blocks[i + 1];
153
+ if (!startPosition) {
154
+ startPosition = writer.createPositionBefore(block);
155
+ }
156
+ if (!nextBlock || block.nextSibling != nextBlock) {
157
+ ranges.push(writer.createRange(startPosition, writer.createPositionAfter(block)));
158
+ startPosition = null;
159
+ }
160
+ i++;
161
+ }
162
+ return ranges;
163
+ }
164
+ /**
165
+ * Checks whether <bQ> can wrap the block.
166
+ */
167
+ function checkCanBeQuoted(schema, block) {
168
+ // TMP will be replaced with schema.checkWrap().
169
+ const isBQAllowed = schema.checkChild(block.parent, 'blockQuote');
170
+ const isBlockAllowedInBQ = schema.checkChild(['$root', 'blockQuote'], block);
171
+ return isBQAllowed && isBlockAllowedInBQ;
172
+ }
@@ -0,0 +1,35 @@
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 block-quote/blockquoteediting
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import { Enter } from 'ckeditor5/src/enter.js';
10
+ import { Delete } from 'ckeditor5/src/typing.js';
11
+ /**
12
+ * The block quote editing.
13
+ *
14
+ * Introduces the `'blockQuote'` command and the `'blockQuote'` model element.
15
+ *
16
+ * @extends module:core/plugin~Plugin
17
+ */
18
+ export default class BlockQuoteEditing extends Plugin {
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ static get pluginName(): "BlockQuoteEditing";
23
+ /**
24
+ * @inheritDoc
25
+ */
26
+ static get isOfficialPlugin(): true;
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ static get requires(): readonly [typeof Enter, typeof Delete];
31
+ /**
32
+ * @inheritDoc
33
+ */
34
+ init(): void;
35
+ }