@ckeditor/ckeditor5-select-all 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 (230) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/LICENSE.md +17 -0
  3. package/README.md +27 -0
  4. package/ckeditor5-metadata.json +18 -0
  5. package/dist/augmentation.d.ts +19 -0
  6. package/dist/index-content.css +4 -0
  7. package/dist/index-editor.css +4 -0
  8. package/dist/index.css +4 -0
  9. package/dist/index.d.ts +16 -0
  10. package/dist/index.js +191 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/selectall.d.ts +36 -0
  13. package/dist/selectallcommand.d.ts +36 -0
  14. package/dist/selectallediting.d.ts +32 -0
  15. package/dist/selectallui.d.ts +37 -0
  16. package/dist/translations/ar.d.ts +8 -0
  17. package/dist/translations/ar.js +5 -0
  18. package/dist/translations/ar.umd.js +11 -0
  19. package/dist/translations/bg.d.ts +8 -0
  20. package/dist/translations/bg.js +5 -0
  21. package/dist/translations/bg.umd.js +11 -0
  22. package/dist/translations/bn.d.ts +8 -0
  23. package/dist/translations/bn.js +5 -0
  24. package/dist/translations/bn.umd.js +11 -0
  25. package/dist/translations/ca.d.ts +8 -0
  26. package/dist/translations/ca.js +5 -0
  27. package/dist/translations/ca.umd.js +11 -0
  28. package/dist/translations/cs.d.ts +8 -0
  29. package/dist/translations/cs.js +5 -0
  30. package/dist/translations/cs.umd.js +11 -0
  31. package/dist/translations/da.d.ts +8 -0
  32. package/dist/translations/da.js +5 -0
  33. package/dist/translations/da.umd.js +11 -0
  34. package/dist/translations/de-ch.d.ts +8 -0
  35. package/dist/translations/de-ch.js +5 -0
  36. package/dist/translations/de-ch.umd.js +11 -0
  37. package/dist/translations/de.d.ts +8 -0
  38. package/dist/translations/de.js +5 -0
  39. package/dist/translations/de.umd.js +11 -0
  40. package/dist/translations/el.d.ts +8 -0
  41. package/dist/translations/el.js +5 -0
  42. package/dist/translations/el.umd.js +11 -0
  43. package/dist/translations/en-au.d.ts +8 -0
  44. package/dist/translations/en-au.js +5 -0
  45. package/dist/translations/en-au.umd.js +11 -0
  46. package/dist/translations/en.d.ts +8 -0
  47. package/dist/translations/en.js +5 -0
  48. package/dist/translations/en.umd.js +11 -0
  49. package/dist/translations/es.d.ts +8 -0
  50. package/dist/translations/es.js +5 -0
  51. package/dist/translations/es.umd.js +11 -0
  52. package/dist/translations/et.d.ts +8 -0
  53. package/dist/translations/et.js +5 -0
  54. package/dist/translations/et.umd.js +11 -0
  55. package/dist/translations/fa.d.ts +8 -0
  56. package/dist/translations/fa.js +5 -0
  57. package/dist/translations/fa.umd.js +11 -0
  58. package/dist/translations/fi.d.ts +8 -0
  59. package/dist/translations/fi.js +5 -0
  60. package/dist/translations/fi.umd.js +11 -0
  61. package/dist/translations/fr.d.ts +8 -0
  62. package/dist/translations/fr.js +5 -0
  63. package/dist/translations/fr.umd.js +11 -0
  64. package/dist/translations/gl.d.ts +8 -0
  65. package/dist/translations/gl.js +5 -0
  66. package/dist/translations/gl.umd.js +11 -0
  67. package/dist/translations/he.d.ts +8 -0
  68. package/dist/translations/he.js +5 -0
  69. package/dist/translations/he.umd.js +11 -0
  70. package/dist/translations/hi.d.ts +8 -0
  71. package/dist/translations/hi.js +5 -0
  72. package/dist/translations/hi.umd.js +11 -0
  73. package/dist/translations/hr.d.ts +8 -0
  74. package/dist/translations/hr.js +5 -0
  75. package/dist/translations/hr.umd.js +11 -0
  76. package/dist/translations/hu.d.ts +8 -0
  77. package/dist/translations/hu.js +5 -0
  78. package/dist/translations/hu.umd.js +11 -0
  79. package/dist/translations/id.d.ts +8 -0
  80. package/dist/translations/id.js +5 -0
  81. package/dist/translations/id.umd.js +11 -0
  82. package/dist/translations/it.d.ts +8 -0
  83. package/dist/translations/it.js +5 -0
  84. package/dist/translations/it.umd.js +11 -0
  85. package/dist/translations/ja.d.ts +8 -0
  86. package/dist/translations/ja.js +5 -0
  87. package/dist/translations/ja.umd.js +11 -0
  88. package/dist/translations/ko.d.ts +8 -0
  89. package/dist/translations/ko.js +5 -0
  90. package/dist/translations/ko.umd.js +11 -0
  91. package/dist/translations/lt.d.ts +8 -0
  92. package/dist/translations/lt.js +5 -0
  93. package/dist/translations/lt.umd.js +11 -0
  94. package/dist/translations/lv.d.ts +8 -0
  95. package/dist/translations/lv.js +5 -0
  96. package/dist/translations/lv.umd.js +11 -0
  97. package/dist/translations/ms.d.ts +8 -0
  98. package/dist/translations/ms.js +5 -0
  99. package/dist/translations/ms.umd.js +11 -0
  100. package/dist/translations/nl.d.ts +8 -0
  101. package/dist/translations/nl.js +5 -0
  102. package/dist/translations/nl.umd.js +11 -0
  103. package/dist/translations/no.d.ts +8 -0
  104. package/dist/translations/no.js +5 -0
  105. package/dist/translations/no.umd.js +11 -0
  106. package/dist/translations/pl.d.ts +8 -0
  107. package/dist/translations/pl.js +5 -0
  108. package/dist/translations/pl.umd.js +11 -0
  109. package/dist/translations/pt-br.d.ts +8 -0
  110. package/dist/translations/pt-br.js +5 -0
  111. package/dist/translations/pt-br.umd.js +11 -0
  112. package/dist/translations/pt.d.ts +8 -0
  113. package/dist/translations/pt.js +5 -0
  114. package/dist/translations/pt.umd.js +11 -0
  115. package/dist/translations/ro.d.ts +8 -0
  116. package/dist/translations/ro.js +5 -0
  117. package/dist/translations/ro.umd.js +11 -0
  118. package/dist/translations/ru.d.ts +8 -0
  119. package/dist/translations/ru.js +5 -0
  120. package/dist/translations/ru.umd.js +11 -0
  121. package/dist/translations/sk.d.ts +8 -0
  122. package/dist/translations/sk.js +5 -0
  123. package/dist/translations/sk.umd.js +11 -0
  124. package/dist/translations/sq.d.ts +8 -0
  125. package/dist/translations/sq.js +5 -0
  126. package/dist/translations/sq.umd.js +11 -0
  127. package/dist/translations/sr-latn.d.ts +8 -0
  128. package/dist/translations/sr-latn.js +5 -0
  129. package/dist/translations/sr-latn.umd.js +11 -0
  130. package/dist/translations/sr.d.ts +8 -0
  131. package/dist/translations/sr.js +5 -0
  132. package/dist/translations/sr.umd.js +11 -0
  133. package/dist/translations/sv.d.ts +8 -0
  134. package/dist/translations/sv.js +5 -0
  135. package/dist/translations/sv.umd.js +11 -0
  136. package/dist/translations/th.d.ts +8 -0
  137. package/dist/translations/th.js +5 -0
  138. package/dist/translations/th.umd.js +11 -0
  139. package/dist/translations/tk.d.ts +8 -0
  140. package/dist/translations/tk.js +5 -0
  141. package/dist/translations/tk.umd.js +11 -0
  142. package/dist/translations/tr.d.ts +8 -0
  143. package/dist/translations/tr.js +5 -0
  144. package/dist/translations/tr.umd.js +11 -0
  145. package/dist/translations/ug.d.ts +8 -0
  146. package/dist/translations/ug.js +5 -0
  147. package/dist/translations/ug.umd.js +11 -0
  148. package/dist/translations/uk.d.ts +8 -0
  149. package/dist/translations/uk.js +5 -0
  150. package/dist/translations/uk.umd.js +11 -0
  151. package/dist/translations/ur.d.ts +8 -0
  152. package/dist/translations/ur.js +5 -0
  153. package/dist/translations/ur.umd.js +11 -0
  154. package/dist/translations/uz.d.ts +8 -0
  155. package/dist/translations/uz.js +5 -0
  156. package/dist/translations/uz.umd.js +11 -0
  157. package/dist/translations/vi.d.ts +8 -0
  158. package/dist/translations/vi.js +5 -0
  159. package/dist/translations/vi.umd.js +11 -0
  160. package/dist/translations/zh-cn.d.ts +8 -0
  161. package/dist/translations/zh-cn.js +5 -0
  162. package/dist/translations/zh-cn.umd.js +11 -0
  163. package/dist/translations/zh.d.ts +8 -0
  164. package/dist/translations/zh.js +5 -0
  165. package/dist/translations/zh.umd.js +11 -0
  166. package/lang/contexts.json +3 -0
  167. package/lang/translations/ar.po +22 -0
  168. package/lang/translations/bg.po +22 -0
  169. package/lang/translations/bn.po +22 -0
  170. package/lang/translations/ca.po +22 -0
  171. package/lang/translations/cs.po +22 -0
  172. package/lang/translations/da.po +22 -0
  173. package/lang/translations/de-ch.po +22 -0
  174. package/lang/translations/de.po +22 -0
  175. package/lang/translations/el.po +22 -0
  176. package/lang/translations/en-au.po +22 -0
  177. package/lang/translations/en.po +22 -0
  178. package/lang/translations/es.po +22 -0
  179. package/lang/translations/et.po +22 -0
  180. package/lang/translations/fa.po +22 -0
  181. package/lang/translations/fi.po +22 -0
  182. package/lang/translations/fr.po +22 -0
  183. package/lang/translations/gl.po +22 -0
  184. package/lang/translations/he.po +22 -0
  185. package/lang/translations/hi.po +22 -0
  186. package/lang/translations/hr.po +22 -0
  187. package/lang/translations/hu.po +22 -0
  188. package/lang/translations/id.po +22 -0
  189. package/lang/translations/it.po +22 -0
  190. package/lang/translations/ja.po +22 -0
  191. package/lang/translations/ko.po +22 -0
  192. package/lang/translations/lt.po +22 -0
  193. package/lang/translations/lv.po +22 -0
  194. package/lang/translations/ms.po +22 -0
  195. package/lang/translations/nl.po +22 -0
  196. package/lang/translations/no.po +22 -0
  197. package/lang/translations/pl.po +22 -0
  198. package/lang/translations/pt-br.po +22 -0
  199. package/lang/translations/pt.po +22 -0
  200. package/lang/translations/ro.po +22 -0
  201. package/lang/translations/ru.po +22 -0
  202. package/lang/translations/sk.po +22 -0
  203. package/lang/translations/sq.po +22 -0
  204. package/lang/translations/sr-latn.po +22 -0
  205. package/lang/translations/sr.po +22 -0
  206. package/lang/translations/sv.po +22 -0
  207. package/lang/translations/th.po +22 -0
  208. package/lang/translations/tk.po +22 -0
  209. package/lang/translations/tr.po +22 -0
  210. package/lang/translations/ug.po +22 -0
  211. package/lang/translations/uk.po +22 -0
  212. package/lang/translations/ur.po +22 -0
  213. package/lang/translations/uz.po +22 -0
  214. package/lang/translations/vi.po +22 -0
  215. package/lang/translations/zh-cn.po +22 -0
  216. package/lang/translations/zh.po +22 -0
  217. package/package.json +39 -0
  218. package/src/augmentation.d.ts +15 -0
  219. package/src/augmentation.js +5 -0
  220. package/src/index.d.ts +12 -0
  221. package/src/index.js +11 -0
  222. package/src/selectall.d.ts +32 -0
  223. package/src/selectall.js +38 -0
  224. package/src/selectallcommand.d.ts +32 -0
  225. package/src/selectallcommand.js +64 -0
  226. package/src/selectallediting.d.ts +28 -0
  227. package/src/selectallediting.js +56 -0
  228. package/src/selectallui.d.ts +33 -0
  229. package/src/selectallui.js +69 -0
  230. package/theme/icons/select-all.svg +1 -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: 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 "The label of the select all toolbar button."
21
+ msgid "Select all"
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 "The label of the select all toolbar button."
21
+ msgid "Select all"
22
+ msgstr "Hammasini tanlash"
@@ -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 "The label of the select all toolbar button."
21
+ msgid "Select all"
22
+ msgstr "Chọn tất cả"
@@ -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 "The label of the select all toolbar button."
21
+ msgid "Select all"
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 "The label of the select all toolbar button."
21
+ msgid "Select all"
22
+ msgstr "選取全部"
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@ckeditor/ckeditor5-select-all",
3
+ "version": "0.0.0-internal-20241017.0",
4
+ "description": "Select all 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-utils": "0.0.0-internal-20241017.0",
18
+ "@ckeditor/ckeditor5-ui": "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-select-all"
28
+ },
29
+ "files": [
30
+ "dist",
31
+ "lang",
32
+ "src/**/*.js",
33
+ "src/**/*.d.ts",
34
+ "theme",
35
+ "ckeditor5-metadata.json",
36
+ "CHANGELOG.md"
37
+ ],
38
+ "types": "src/index.d.ts"
39
+ }
@@ -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 { SelectAll, SelectAllEditing, SelectAllUI, SelectAllCommand } from './index.js';
6
+ declare module '@ckeditor/ckeditor5-core' {
7
+ interface PluginsMap {
8
+ [SelectAll.pluginName]: SelectAll;
9
+ [SelectAllEditing.pluginName]: SelectAllEditing;
10
+ [SelectAllUI.pluginName]: SelectAllUI;
11
+ }
12
+ interface CommandsMap {
13
+ selectAll: SelectAllCommand;
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 {};
package/src/index.d.ts ADDED
@@ -0,0 +1,12 @@
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 select-all
7
+ */
8
+ export { default as SelectAll } from './selectall.js';
9
+ export { default as SelectAllEditing } from './selectallediting.js';
10
+ export { default as SelectAllUI } from './selectallui.js';
11
+ export type { default as SelectAllCommand } from './selectallcommand.js';
12
+ import './augmentation.js';
package/src/index.js ADDED
@@ -0,0 +1,11 @@
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 select-all
7
+ */
8
+ export { default as SelectAll } from './selectall.js';
9
+ export { default as SelectAllEditing } from './selectallediting.js';
10
+ export { default as SelectAllUI } from './selectallui.js';
11
+ import './augmentation.js';
@@ -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 select-all/selectall
7
+ */
8
+ import { Plugin } from '@ckeditor/ckeditor5-core';
9
+ import SelectAllEditing from './selectallediting.js';
10
+ import SelectAllUI from './selectallui.js';
11
+ /**
12
+ * The select all feature.
13
+ *
14
+ * This is a "glue" plugin which loads the {@link module:select-all/selectallediting~SelectAllEditing select all editing feature}
15
+ * and the {@link module:select-all/selectallui~SelectAllUI select all UI feature}.
16
+ *
17
+ * Please refer to the documentation of individual features to learn more.
18
+ */
19
+ export default class SelectAll extends Plugin {
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ static get requires(): readonly [typeof SelectAllEditing, typeof SelectAllUI];
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static get pluginName(): "SelectAll";
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 select-all/selectall
7
+ */
8
+ import { Plugin } from '@ckeditor/ckeditor5-core';
9
+ import SelectAllEditing from './selectallediting.js';
10
+ import SelectAllUI from './selectallui.js';
11
+ /**
12
+ * The select all feature.
13
+ *
14
+ * This is a "glue" plugin which loads the {@link module:select-all/selectallediting~SelectAllEditing select all editing feature}
15
+ * and the {@link module:select-all/selectallui~SelectAllUI select all UI feature}.
16
+ *
17
+ * Please refer to the documentation of individual features to learn more.
18
+ */
19
+ export default class SelectAll extends Plugin {
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ static get requires() {
24
+ return [SelectAllEditing, SelectAllUI];
25
+ }
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static get pluginName() {
30
+ return 'SelectAll';
31
+ }
32
+ /**
33
+ * @inheritDoc
34
+ */
35
+ static get isOfficialPlugin() {
36
+ return true;
37
+ }
38
+ }
@@ -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 select-all/selectallcommand
7
+ */
8
+ import { Command, type Editor } from '@ckeditor/ckeditor5-core';
9
+ /**
10
+ * The select all command.
11
+ *
12
+ * It is used by the {@link module:select-all/selectallediting~SelectAllEditing select all editing feature} to handle
13
+ * the <kbd>Ctrl/⌘</kbd>+<kbd>A</kbd> keystroke.
14
+ *
15
+ * Executing this command changes the {@glink framework/architecture/editing-engine#model model}
16
+ * selection so it contains the entire content of the editable root of the editor the selection is
17
+ * {@link module:engine/model/selection~Selection#anchor anchored} in.
18
+ *
19
+ * If the selection was anchored in a {@glink framework/tutorials/widgets/implementing-a-block-widget nested editable}
20
+ * (e.g. a caption of an image), the new selection will contain its entire content. Successive executions of this command
21
+ * will expand the selection to encompass more and more content up to the entire editable root of the editor.
22
+ */
23
+ export default class SelectAllCommand extends Command {
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ constructor(editor: Editor);
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ execute(): void;
32
+ }
@@ -0,0 +1,64 @@
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 select-all/selectallcommand
7
+ */
8
+ import { Command } from '@ckeditor/ckeditor5-core';
9
+ /**
10
+ * The select all command.
11
+ *
12
+ * It is used by the {@link module:select-all/selectallediting~SelectAllEditing select all editing feature} to handle
13
+ * the <kbd>Ctrl/⌘</kbd>+<kbd>A</kbd> keystroke.
14
+ *
15
+ * Executing this command changes the {@glink framework/architecture/editing-engine#model model}
16
+ * selection so it contains the entire content of the editable root of the editor the selection is
17
+ * {@link module:engine/model/selection~Selection#anchor anchored} in.
18
+ *
19
+ * If the selection was anchored in a {@glink framework/tutorials/widgets/implementing-a-block-widget nested editable}
20
+ * (e.g. a caption of an image), the new selection will contain its entire content. Successive executions of this command
21
+ * will expand the selection to encompass more and more content up to the entire editable root of the editor.
22
+ */
23
+ export default class SelectAllCommand extends Command {
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ constructor(editor) {
28
+ super(editor);
29
+ // It does not affect data so should be enabled in read-only mode.
30
+ this.affectsData = false;
31
+ }
32
+ /**
33
+ * @inheritDoc
34
+ */
35
+ execute() {
36
+ const model = this.editor.model;
37
+ const selection = model.document.selection;
38
+ let scopeElement = model.schema.getLimitElement(selection);
39
+ // If an entire scope is selected, or the selection's ancestor is not a scope yet,
40
+ // browse through ancestors to find the enclosing parent scope.
41
+ if (selection.containsEntireContent(scopeElement) || !isSelectAllScope(model.schema, scopeElement)) {
42
+ do {
43
+ scopeElement = scopeElement.parent;
44
+ // Do nothing, if the entire `root` is already selected.
45
+ if (!scopeElement) {
46
+ return;
47
+ }
48
+ } while (!isSelectAllScope(model.schema, scopeElement));
49
+ }
50
+ model.change(writer => {
51
+ writer.setSelection(scopeElement, 'in');
52
+ });
53
+ }
54
+ }
55
+ /**
56
+ * Checks whether the element is a valid select-all scope. Returns true, if the element is a
57
+ * {@link module:engine/model/schema~Schema#isLimit limit}, and can contain any text or paragraph.
58
+ *
59
+ * @param schema Schema to check against.
60
+ * @param element Model element.
61
+ */
62
+ function isSelectAllScope(schema, element) {
63
+ return schema.isLimit(element) && (schema.checkChild(element, '$text') || schema.checkChild(element, 'paragraph'));
64
+ }
@@ -0,0 +1,28 @@
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 select-all/selectallediting
7
+ */
8
+ import { Plugin } from '@ckeditor/ckeditor5-core';
9
+ /**
10
+ * The select all editing feature.
11
+ *
12
+ * It registers the `'selectAll'` {@link module:select-all/selectallcommand~SelectAllCommand command}
13
+ * and the <kbd>Ctrl/⌘</kbd>+<kbd>A</kbd> keystroke listener which executes it.
14
+ */
15
+ export default class SelectAllEditing extends Plugin {
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ static get pluginName(): "SelectAllEditing";
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ static get isOfficialPlugin(): true;
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ init(): void;
28
+ }
@@ -0,0 +1,56 @@
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 select-all/selectallediting
7
+ */
8
+ import { Plugin } from '@ckeditor/ckeditor5-core';
9
+ import { getCode, parseKeystroke } from '@ckeditor/ckeditor5-utils';
10
+ import SelectAllCommand from './selectallcommand.js';
11
+ const SELECT_ALL_KEYSTROKE = /* #__PURE__ */ parseKeystroke('Ctrl+A');
12
+ /**
13
+ * The select all editing feature.
14
+ *
15
+ * It registers the `'selectAll'` {@link module:select-all/selectallcommand~SelectAllCommand command}
16
+ * and the <kbd>Ctrl/⌘</kbd>+<kbd>A</kbd> keystroke listener which executes it.
17
+ */
18
+ export default class SelectAllEditing extends Plugin {
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ static get pluginName() {
23
+ return 'SelectAllEditing';
24
+ }
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ static get isOfficialPlugin() {
29
+ return true;
30
+ }
31
+ /**
32
+ * @inheritDoc
33
+ */
34
+ init() {
35
+ const editor = this.editor;
36
+ const t = editor.t;
37
+ const view = editor.editing.view;
38
+ const viewDocument = view.document;
39
+ editor.commands.add('selectAll', new SelectAllCommand(editor));
40
+ this.listenTo(viewDocument, 'keydown', (eventInfo, domEventData) => {
41
+ if (getCode(domEventData) === SELECT_ALL_KEYSTROKE) {
42
+ editor.execute('selectAll');
43
+ domEventData.preventDefault();
44
+ }
45
+ });
46
+ // Add the information about the keystroke to the accessibility database.
47
+ editor.accessibility.addKeystrokeInfos({
48
+ keystrokes: [
49
+ {
50
+ label: t('Select all'),
51
+ keystroke: 'CTRL+A'
52
+ }
53
+ ]
54
+ });
55
+ }
56
+ }
@@ -0,0 +1,33 @@
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 select-all/selectallui
7
+ */
8
+ import { Plugin } from '@ckeditor/ckeditor5-core';
9
+ /**
10
+ * The select all UI feature.
11
+ *
12
+ * It registers the `'selectAll'` UI button in the editor's
13
+ * {@link module:ui/componentfactory~ComponentFactory component factory}. When clicked, the button
14
+ * executes the {@link module:select-all/selectallcommand~SelectAllCommand select all command}.
15
+ */
16
+ export default class SelectAllUI extends Plugin {
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ static get pluginName(): "SelectAllUI";
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ static get isOfficialPlugin(): true;
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ init(): void;
29
+ /**
30
+ * Creates a button for select all command to use either in toolbar or in menu bar.
31
+ */
32
+ private _createButton;
33
+ }
@@ -0,0 +1,69 @@
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 select-all/selectallui
7
+ */
8
+ import { Plugin } from '@ckeditor/ckeditor5-core';
9
+ import { ButtonView, MenuBarMenuListItemButtonView } from '@ckeditor/ckeditor5-ui';
10
+ import selectAllIcon from '../theme/icons/select-all.svg';
11
+ /**
12
+ * The select all UI feature.
13
+ *
14
+ * It registers the `'selectAll'` UI button in the editor's
15
+ * {@link module:ui/componentfactory~ComponentFactory component factory}. When clicked, the button
16
+ * executes the {@link module:select-all/selectallcommand~SelectAllCommand select all command}.
17
+ */
18
+ export default class SelectAllUI extends Plugin {
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ static get pluginName() {
23
+ return 'SelectAllUI';
24
+ }
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ static get isOfficialPlugin() {
29
+ return true;
30
+ }
31
+ /**
32
+ * @inheritDoc
33
+ */
34
+ init() {
35
+ const editor = this.editor;
36
+ editor.ui.componentFactory.add('selectAll', () => {
37
+ const buttonView = this._createButton(ButtonView);
38
+ buttonView.set({
39
+ tooltip: true
40
+ });
41
+ return buttonView;
42
+ });
43
+ editor.ui.componentFactory.add('menuBar:selectAll', () => {
44
+ return this._createButton(MenuBarMenuListItemButtonView);
45
+ });
46
+ }
47
+ /**
48
+ * Creates a button for select all command to use either in toolbar or in menu bar.
49
+ */
50
+ _createButton(ButtonClass) {
51
+ const editor = this.editor;
52
+ const locale = editor.locale;
53
+ const command = editor.commands.get('selectAll');
54
+ const view = new ButtonClass(editor.locale);
55
+ const t = locale.t;
56
+ view.set({
57
+ label: t('Select all'),
58
+ icon: selectAllIcon,
59
+ keystroke: 'Ctrl+A'
60
+ });
61
+ view.bind('isEnabled').to(command, 'isEnabled');
62
+ // Execute the command.
63
+ this.listenTo(view, 'execute', () => {
64
+ editor.execute('selectAll');
65
+ editor.editing.view.focus();
66
+ });
67
+ return view;
68
+ }
69
+ }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M.75 15.5a.75.75 0 0 1 .75.75V18l.008.09A.5.5 0 0 0 2 18.5h1.75a.75.75 0 1 1 0 1.5H1.5l-.144-.007a1.5 1.5 0 0 1-1.35-1.349L0 18.5v-2.25a.75.75 0 0 1 .75-.75zm18.5 0a.75.75 0 0 1 .75.75v2.25l-.007.144a1.5 1.5 0 0 1-1.349 1.35L18.5 20h-2.25a.75.75 0 1 1 0-1.5H18a.5.5 0 0 0 .492-.41L18.5 18v-1.75a.75.75 0 0 1 .75-.75zm-10.45 3c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm.45-5.5a.75.75 0 1 1 0 1.5h-8.5a.75.75 0 1 1 0-1.5h8.5zM1.3 11c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM1.3 7c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5h-2.5a.75.75 0 1 1 0-1.5h2.5zm-5 0a.75.75 0 1 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5h5.5zm-6.5-5a.75.75 0 0 1 0 1.5H2a.5.5 0 0 0-.492.41L1.5 2v1.75a.75.75 0 0 1-1.5 0V1.5l.007-.144A1.5 1.5 0 0 1 1.356.006L1.5 0h2.25zM18.5 0l.144.007a1.5 1.5 0 0 1 1.35 1.349L20 1.5v2.25a.75.75 0 1 1-1.5 0V2l-.008-.09A.5.5 0 0 0 18 1.5h-1.75a.75.75 0 1 1 0-1.5h2.25zM8.8 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6z"/></svg>