@ckeditor/ckeditor5-fullscreen 0.0.1 → 45.0.0-alpha.1

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 (398) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/LICENSE.md +9 -5
  3. package/README.md +36 -3
  4. package/build/fullscreen.js +5 -0
  5. package/build/translations/af.js +1 -0
  6. package/build/translations/ar.js +1 -0
  7. package/build/translations/ast.js +1 -0
  8. package/build/translations/az.js +1 -0
  9. package/build/translations/be.js +1 -0
  10. package/build/translations/bg.js +1 -0
  11. package/build/translations/bn.js +1 -0
  12. package/build/translations/bs.js +1 -0
  13. package/build/translations/ca.js +1 -0
  14. package/build/translations/cs.js +1 -0
  15. package/build/translations/da.js +1 -0
  16. package/build/translations/de-ch.js +1 -0
  17. package/build/translations/de.js +1 -0
  18. package/build/translations/el.js +1 -0
  19. package/build/translations/en-au.js +1 -0
  20. package/build/translations/en-gb.js +1 -0
  21. package/build/translations/eo.js +1 -0
  22. package/build/translations/es-co.js +1 -0
  23. package/build/translations/es.js +1 -0
  24. package/build/translations/et.js +1 -0
  25. package/build/translations/eu.js +1 -0
  26. package/build/translations/fa.js +1 -0
  27. package/build/translations/fi.js +1 -0
  28. package/build/translations/fr.js +1 -0
  29. package/build/translations/gl.js +1 -0
  30. package/build/translations/gu.js +1 -0
  31. package/build/translations/he.js +1 -0
  32. package/build/translations/hi.js +1 -0
  33. package/build/translations/hr.js +1 -0
  34. package/build/translations/hu.js +1 -0
  35. package/build/translations/hy.js +1 -0
  36. package/build/translations/id.js +1 -0
  37. package/build/translations/it.js +1 -0
  38. package/build/translations/ja.js +1 -0
  39. package/build/translations/jv.js +1 -0
  40. package/build/translations/kk.js +1 -0
  41. package/build/translations/km.js +1 -0
  42. package/build/translations/kn.js +1 -0
  43. package/build/translations/ko.js +1 -0
  44. package/build/translations/ku.js +1 -0
  45. package/build/translations/lt.js +1 -0
  46. package/build/translations/lv.js +1 -0
  47. package/build/translations/ms.js +1 -0
  48. package/build/translations/nb.js +1 -0
  49. package/build/translations/ne.js +1 -0
  50. package/build/translations/nl.js +1 -0
  51. package/build/translations/no.js +1 -0
  52. package/build/translations/oc.js +1 -0
  53. package/build/translations/pl.js +1 -0
  54. package/build/translations/pt-br.js +1 -0
  55. package/build/translations/pt.js +1 -0
  56. package/build/translations/ro.js +1 -0
  57. package/build/translations/ru.js +1 -0
  58. package/build/translations/si.js +1 -0
  59. package/build/translations/sk.js +1 -0
  60. package/build/translations/sl.js +1 -0
  61. package/build/translations/sq.js +1 -0
  62. package/build/translations/sr-latn.js +1 -0
  63. package/build/translations/sr.js +1 -0
  64. package/build/translations/sv.js +1 -0
  65. package/build/translations/th.js +1 -0
  66. package/build/translations/ti.js +1 -0
  67. package/build/translations/tk.js +1 -0
  68. package/build/translations/tr.js +1 -0
  69. package/build/translations/tt.js +1 -0
  70. package/build/translations/ug.js +1 -0
  71. package/build/translations/uk.js +1 -0
  72. package/build/translations/ur.js +1 -0
  73. package/build/translations/uz.js +1 -0
  74. package/build/translations/vi.js +1 -0
  75. package/build/translations/zh-cn.js +1 -0
  76. package/build/translations/zh.js +1 -0
  77. package/ckeditor5-metadata.json +11 -0
  78. package/dist/index-content.css +4 -0
  79. package/dist/index-editor.css +175 -0
  80. package/dist/index.css +209 -0
  81. package/dist/index.css.map +1 -0
  82. package/dist/index.js +710 -0
  83. package/dist/index.js.map +1 -0
  84. package/dist/translations/af.d.ts +8 -0
  85. package/dist/translations/af.js +5 -0
  86. package/dist/translations/af.umd.js +11 -0
  87. package/dist/translations/ar.d.ts +8 -0
  88. package/dist/translations/ar.js +5 -0
  89. package/dist/translations/ar.umd.js +11 -0
  90. package/dist/translations/ast.d.ts +8 -0
  91. package/dist/translations/ast.js +5 -0
  92. package/dist/translations/ast.umd.js +11 -0
  93. package/dist/translations/az.d.ts +8 -0
  94. package/dist/translations/az.js +5 -0
  95. package/dist/translations/az.umd.js +11 -0
  96. package/dist/translations/be.d.ts +8 -0
  97. package/dist/translations/be.js +5 -0
  98. package/dist/translations/be.umd.js +11 -0
  99. package/dist/translations/bg.d.ts +8 -0
  100. package/dist/translations/bg.js +5 -0
  101. package/dist/translations/bg.umd.js +11 -0
  102. package/dist/translations/bn.d.ts +8 -0
  103. package/dist/translations/bn.js +5 -0
  104. package/dist/translations/bn.umd.js +11 -0
  105. package/dist/translations/bs.d.ts +8 -0
  106. package/dist/translations/bs.js +5 -0
  107. package/dist/translations/bs.umd.js +11 -0
  108. package/dist/translations/ca.d.ts +8 -0
  109. package/dist/translations/ca.js +5 -0
  110. package/dist/translations/ca.umd.js +11 -0
  111. package/dist/translations/cs.d.ts +8 -0
  112. package/dist/translations/cs.js +5 -0
  113. package/dist/translations/cs.umd.js +11 -0
  114. package/dist/translations/da.d.ts +8 -0
  115. package/dist/translations/da.js +5 -0
  116. package/dist/translations/da.umd.js +11 -0
  117. package/dist/translations/de-ch.d.ts +8 -0
  118. package/dist/translations/de-ch.js +5 -0
  119. package/dist/translations/de-ch.umd.js +11 -0
  120. package/dist/translations/de.d.ts +8 -0
  121. package/dist/translations/de.js +5 -0
  122. package/dist/translations/de.umd.js +11 -0
  123. package/dist/translations/el.d.ts +8 -0
  124. package/dist/translations/el.js +5 -0
  125. package/dist/translations/el.umd.js +11 -0
  126. package/dist/translations/en-au.d.ts +8 -0
  127. package/dist/translations/en-au.js +5 -0
  128. package/dist/translations/en-au.umd.js +11 -0
  129. package/dist/translations/en-gb.d.ts +8 -0
  130. package/dist/translations/en-gb.js +5 -0
  131. package/dist/translations/en-gb.umd.js +11 -0
  132. package/dist/translations/en.d.ts +8 -0
  133. package/dist/translations/en.js +5 -0
  134. package/dist/translations/en.umd.js +11 -0
  135. package/dist/translations/eo.d.ts +8 -0
  136. package/dist/translations/eo.js +5 -0
  137. package/dist/translations/eo.umd.js +11 -0
  138. package/dist/translations/es-co.d.ts +8 -0
  139. package/dist/translations/es-co.js +5 -0
  140. package/dist/translations/es-co.umd.js +11 -0
  141. package/dist/translations/es.d.ts +8 -0
  142. package/dist/translations/es.js +5 -0
  143. package/dist/translations/es.umd.js +11 -0
  144. package/dist/translations/et.d.ts +8 -0
  145. package/dist/translations/et.js +5 -0
  146. package/dist/translations/et.umd.js +11 -0
  147. package/dist/translations/eu.d.ts +8 -0
  148. package/dist/translations/eu.js +5 -0
  149. package/dist/translations/eu.umd.js +11 -0
  150. package/dist/translations/fa.d.ts +8 -0
  151. package/dist/translations/fa.js +5 -0
  152. package/dist/translations/fa.umd.js +11 -0
  153. package/dist/translations/fi.d.ts +8 -0
  154. package/dist/translations/fi.js +5 -0
  155. package/dist/translations/fi.umd.js +11 -0
  156. package/dist/translations/fr.d.ts +8 -0
  157. package/dist/translations/fr.js +5 -0
  158. package/dist/translations/fr.umd.js +11 -0
  159. package/dist/translations/gl.d.ts +8 -0
  160. package/dist/translations/gl.js +5 -0
  161. package/dist/translations/gl.umd.js +11 -0
  162. package/dist/translations/gu.d.ts +8 -0
  163. package/dist/translations/gu.js +5 -0
  164. package/dist/translations/gu.umd.js +11 -0
  165. package/dist/translations/he.d.ts +8 -0
  166. package/dist/translations/he.js +5 -0
  167. package/dist/translations/he.umd.js +11 -0
  168. package/dist/translations/hi.d.ts +8 -0
  169. package/dist/translations/hi.js +5 -0
  170. package/dist/translations/hi.umd.js +11 -0
  171. package/dist/translations/hr.d.ts +8 -0
  172. package/dist/translations/hr.js +5 -0
  173. package/dist/translations/hr.umd.js +11 -0
  174. package/dist/translations/hu.d.ts +8 -0
  175. package/dist/translations/hu.js +5 -0
  176. package/dist/translations/hu.umd.js +11 -0
  177. package/dist/translations/hy.d.ts +8 -0
  178. package/dist/translations/hy.js +5 -0
  179. package/dist/translations/hy.umd.js +11 -0
  180. package/dist/translations/id.d.ts +8 -0
  181. package/dist/translations/id.js +5 -0
  182. package/dist/translations/id.umd.js +11 -0
  183. package/dist/translations/it.d.ts +8 -0
  184. package/dist/translations/it.js +5 -0
  185. package/dist/translations/it.umd.js +11 -0
  186. package/dist/translations/ja.d.ts +8 -0
  187. package/dist/translations/ja.js +5 -0
  188. package/dist/translations/ja.umd.js +11 -0
  189. package/dist/translations/jv.d.ts +8 -0
  190. package/dist/translations/jv.js +5 -0
  191. package/dist/translations/jv.umd.js +11 -0
  192. package/dist/translations/kk.d.ts +8 -0
  193. package/dist/translations/kk.js +5 -0
  194. package/dist/translations/kk.umd.js +11 -0
  195. package/dist/translations/km.d.ts +8 -0
  196. package/dist/translations/km.js +5 -0
  197. package/dist/translations/km.umd.js +11 -0
  198. package/dist/translations/kn.d.ts +8 -0
  199. package/dist/translations/kn.js +5 -0
  200. package/dist/translations/kn.umd.js +11 -0
  201. package/dist/translations/ko.d.ts +8 -0
  202. package/dist/translations/ko.js +5 -0
  203. package/dist/translations/ko.umd.js +11 -0
  204. package/dist/translations/ku.d.ts +8 -0
  205. package/dist/translations/ku.js +5 -0
  206. package/dist/translations/ku.umd.js +11 -0
  207. package/dist/translations/lt.d.ts +8 -0
  208. package/dist/translations/lt.js +5 -0
  209. package/dist/translations/lt.umd.js +11 -0
  210. package/dist/translations/lv.d.ts +8 -0
  211. package/dist/translations/lv.js +5 -0
  212. package/dist/translations/lv.umd.js +11 -0
  213. package/dist/translations/ms.d.ts +8 -0
  214. package/dist/translations/ms.js +5 -0
  215. package/dist/translations/ms.umd.js +11 -0
  216. package/dist/translations/nb.d.ts +8 -0
  217. package/dist/translations/nb.js +5 -0
  218. package/dist/translations/nb.umd.js +11 -0
  219. package/dist/translations/ne.d.ts +8 -0
  220. package/dist/translations/ne.js +5 -0
  221. package/dist/translations/ne.umd.js +11 -0
  222. package/dist/translations/nl.d.ts +8 -0
  223. package/dist/translations/nl.js +5 -0
  224. package/dist/translations/nl.umd.js +11 -0
  225. package/dist/translations/no.d.ts +8 -0
  226. package/dist/translations/no.js +5 -0
  227. package/dist/translations/no.umd.js +11 -0
  228. package/dist/translations/oc.d.ts +8 -0
  229. package/dist/translations/oc.js +5 -0
  230. package/dist/translations/oc.umd.js +11 -0
  231. package/dist/translations/pl.d.ts +8 -0
  232. package/dist/translations/pl.js +5 -0
  233. package/dist/translations/pl.umd.js +11 -0
  234. package/dist/translations/pt-br.d.ts +8 -0
  235. package/dist/translations/pt-br.js +5 -0
  236. package/dist/translations/pt-br.umd.js +11 -0
  237. package/dist/translations/pt.d.ts +8 -0
  238. package/dist/translations/pt.js +5 -0
  239. package/dist/translations/pt.umd.js +11 -0
  240. package/dist/translations/ro.d.ts +8 -0
  241. package/dist/translations/ro.js +5 -0
  242. package/dist/translations/ro.umd.js +11 -0
  243. package/dist/translations/ru.d.ts +8 -0
  244. package/dist/translations/ru.js +5 -0
  245. package/dist/translations/ru.umd.js +11 -0
  246. package/dist/translations/si.d.ts +8 -0
  247. package/dist/translations/si.js +5 -0
  248. package/dist/translations/si.umd.js +11 -0
  249. package/dist/translations/sk.d.ts +8 -0
  250. package/dist/translations/sk.js +5 -0
  251. package/dist/translations/sk.umd.js +11 -0
  252. package/dist/translations/sl.d.ts +8 -0
  253. package/dist/translations/sl.js +5 -0
  254. package/dist/translations/sl.umd.js +11 -0
  255. package/dist/translations/sq.d.ts +8 -0
  256. package/dist/translations/sq.js +5 -0
  257. package/dist/translations/sq.umd.js +11 -0
  258. package/dist/translations/sr-latn.d.ts +8 -0
  259. package/dist/translations/sr-latn.js +5 -0
  260. package/dist/translations/sr-latn.umd.js +11 -0
  261. package/dist/translations/sr.d.ts +8 -0
  262. package/dist/translations/sr.js +5 -0
  263. package/dist/translations/sr.umd.js +11 -0
  264. package/dist/translations/sv.d.ts +8 -0
  265. package/dist/translations/sv.js +5 -0
  266. package/dist/translations/sv.umd.js +11 -0
  267. package/dist/translations/th.d.ts +8 -0
  268. package/dist/translations/th.js +5 -0
  269. package/dist/translations/th.umd.js +11 -0
  270. package/dist/translations/ti.d.ts +8 -0
  271. package/dist/translations/ti.js +5 -0
  272. package/dist/translations/ti.umd.js +11 -0
  273. package/dist/translations/tk.d.ts +8 -0
  274. package/dist/translations/tk.js +5 -0
  275. package/dist/translations/tk.umd.js +11 -0
  276. package/dist/translations/tr.d.ts +8 -0
  277. package/dist/translations/tr.js +5 -0
  278. package/dist/translations/tr.umd.js +11 -0
  279. package/dist/translations/tt.d.ts +8 -0
  280. package/dist/translations/tt.js +5 -0
  281. package/dist/translations/tt.umd.js +11 -0
  282. package/dist/translations/ug.d.ts +8 -0
  283. package/dist/translations/ug.js +5 -0
  284. package/dist/translations/ug.umd.js +11 -0
  285. package/dist/translations/uk.d.ts +8 -0
  286. package/dist/translations/uk.js +5 -0
  287. package/dist/translations/uk.umd.js +11 -0
  288. package/dist/translations/ur.d.ts +8 -0
  289. package/dist/translations/ur.js +5 -0
  290. package/dist/translations/ur.umd.js +11 -0
  291. package/dist/translations/uz.d.ts +8 -0
  292. package/dist/translations/uz.js +5 -0
  293. package/dist/translations/uz.umd.js +11 -0
  294. package/dist/translations/vi.d.ts +8 -0
  295. package/dist/translations/vi.js +5 -0
  296. package/dist/translations/vi.umd.js +11 -0
  297. package/dist/translations/zh-cn.d.ts +8 -0
  298. package/dist/translations/zh-cn.js +5 -0
  299. package/dist/translations/zh-cn.umd.js +11 -0
  300. package/dist/translations/zh.d.ts +8 -0
  301. package/dist/translations/zh.js +5 -0
  302. package/dist/translations/zh.umd.js +11 -0
  303. package/lang/contexts.json +6 -0
  304. package/lang/translations/af.po +28 -0
  305. package/lang/translations/ar.po +28 -0
  306. package/lang/translations/ast.po +28 -0
  307. package/lang/translations/az.po +28 -0
  308. package/lang/translations/be.po +28 -0
  309. package/lang/translations/bg.po +28 -0
  310. package/lang/translations/bn.po +28 -0
  311. package/lang/translations/bs.po +28 -0
  312. package/lang/translations/ca.po +28 -0
  313. package/lang/translations/cs.po +28 -0
  314. package/lang/translations/da.po +28 -0
  315. package/lang/translations/de-ch.po +28 -0
  316. package/lang/translations/de.po +28 -0
  317. package/lang/translations/el.po +28 -0
  318. package/lang/translations/en-au.po +28 -0
  319. package/lang/translations/en-gb.po +28 -0
  320. package/lang/translations/en.po +28 -0
  321. package/lang/translations/eo.po +28 -0
  322. package/lang/translations/es-co.po +28 -0
  323. package/lang/translations/es.po +28 -0
  324. package/lang/translations/et.po +28 -0
  325. package/lang/translations/eu.po +28 -0
  326. package/lang/translations/fa.po +28 -0
  327. package/lang/translations/fi.po +28 -0
  328. package/lang/translations/fr.po +28 -0
  329. package/lang/translations/gl.po +28 -0
  330. package/lang/translations/gu.po +28 -0
  331. package/lang/translations/he.po +28 -0
  332. package/lang/translations/hi.po +28 -0
  333. package/lang/translations/hr.po +28 -0
  334. package/lang/translations/hu.po +28 -0
  335. package/lang/translations/hy.po +28 -0
  336. package/lang/translations/id.po +28 -0
  337. package/lang/translations/it.po +28 -0
  338. package/lang/translations/ja.po +28 -0
  339. package/lang/translations/jv.po +28 -0
  340. package/lang/translations/kk.po +28 -0
  341. package/lang/translations/km.po +28 -0
  342. package/lang/translations/kn.po +28 -0
  343. package/lang/translations/ko.po +28 -0
  344. package/lang/translations/ku.po +28 -0
  345. package/lang/translations/lt.po +28 -0
  346. package/lang/translations/lv.po +28 -0
  347. package/lang/translations/ms.po +28 -0
  348. package/lang/translations/nb.po +28 -0
  349. package/lang/translations/ne.po +28 -0
  350. package/lang/translations/nl.po +28 -0
  351. package/lang/translations/no.po +28 -0
  352. package/lang/translations/oc.po +28 -0
  353. package/lang/translations/pl.po +28 -0
  354. package/lang/translations/pt-br.po +28 -0
  355. package/lang/translations/pt.po +28 -0
  356. package/lang/translations/ro.po +28 -0
  357. package/lang/translations/ru.po +28 -0
  358. package/lang/translations/si.po +28 -0
  359. package/lang/translations/sk.po +28 -0
  360. package/lang/translations/sl.po +28 -0
  361. package/lang/translations/sq.po +28 -0
  362. package/lang/translations/sr-latn.po +28 -0
  363. package/lang/translations/sr.po +28 -0
  364. package/lang/translations/sv.po +28 -0
  365. package/lang/translations/th.po +28 -0
  366. package/lang/translations/ti.po +28 -0
  367. package/lang/translations/tk.po +28 -0
  368. package/lang/translations/tr.po +28 -0
  369. package/lang/translations/tt.po +28 -0
  370. package/lang/translations/ug.po +28 -0
  371. package/lang/translations/uk.po +28 -0
  372. package/lang/translations/ur.po +28 -0
  373. package/lang/translations/uz.po +28 -0
  374. package/lang/translations/vi.po +28 -0
  375. package/lang/translations/zh-cn.po +28 -0
  376. package/lang/translations/zh.po +28 -0
  377. package/package.json +61 -4
  378. package/src/augmentation.d.ts +21 -0
  379. package/src/augmentation.js +5 -0
  380. package/src/fullscreen.d.ts +27 -0
  381. package/src/fullscreen.js +33 -0
  382. package/src/fullscreencommand.d.ts +40 -0
  383. package/src/fullscreencommand.js +68 -0
  384. package/src/fullscreenconfig.d.ts +70 -0
  385. package/src/fullscreenconfig.js +5 -0
  386. package/src/fullscreenediting.d.ts +29 -0
  387. package/src/fullscreenediting.js +59 -0
  388. package/src/fullscreenui.d.ts +35 -0
  389. package/src/fullscreenui.js +76 -0
  390. package/src/handlers/abstracteditorhandler.d.ts +146 -0
  391. package/src/handlers/abstracteditorhandler.js +509 -0
  392. package/src/handlers/classiceditorhandler.d.ts +23 -0
  393. package/src/handlers/classiceditorhandler.js +54 -0
  394. package/src/handlers/decouplededitorhandler.d.ts +26 -0
  395. package/src/handlers/decouplededitorhandler.js +37 -0
  396. package/src/index.d.ts +13 -0
  397. package/src/index.js +11 -0
  398. package/theme/fullscreen.css +206 -0
@@ -0,0 +1,70 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ /**
6
+ * @module fullscreen/fullscreenconfig
7
+ */
8
+ /**
9
+ * The configuration of the fullscreen mode feature.
10
+ *
11
+ * The properties defined in this config are set in the `config.fullscreen` namespace.
12
+ *
13
+ * ```ts
14
+ * ClassicEditor
15
+ * .create( editorElement, {
16
+ * fullscreen: {
17
+ * // Fullscreen mode configuration.
18
+ * }
19
+ * } )
20
+ * .then( ... )
21
+ * .catch( ... );
22
+ * ```
23
+ *
24
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
25
+ */
26
+ export default interface FullscreenConfig {
27
+ /**
28
+ * Customizable callback that is called when you enter the fullscreen mode.
29
+ * It's executed after the editor UI elements are moved to the fullscreen mode.
30
+ *
31
+ * @default `() => {}`
32
+ */
33
+ onEnterCallback?: (container: HTMLElement) => void;
34
+ /**
35
+ * Customizable callback that is called when you leave the fullscreen mode.
36
+ * It's executed before the editor UI elements are moved back to the normal mode.
37
+ *
38
+ * @default `() => {}`
39
+ */
40
+ onLeaveCallback?: (container: HTMLElement) => void;
41
+ /**
42
+ * The container element for the fullscreen mode. This should be a reference to an existing, positioned element in the DOM.
43
+ * By default, the fullscreen mode is appended to the `<body>` element.
44
+ */
45
+ container?: HTMLElement;
46
+ /**
47
+ * The configuration of the menu bar in the fullscreen mode.
48
+ */
49
+ menuBar?: {
50
+ /**
51
+ * Whether the menu bar is visible in the fullscreen mode.
52
+ *
53
+ * @default true
54
+ */
55
+ isVisible?: boolean;
56
+ };
57
+ /**
58
+ * The configuration of the toolbar in the fullscreen mode.
59
+ */
60
+ toolbar?: {
61
+ /**
62
+ * Whether toolbar should be grouping items for which there is not enough space.
63
+ * By default, toolbar will behave the same as outside the fullscreen mode. You can specify this option to change this behavior
64
+ * independently for the fullscreen mode.
65
+ *
66
+ * @default `!!config.toolbar.shouldNotGroupWhenFull`
67
+ */
68
+ shouldNotGroupWhenFull?: boolean;
69
+ };
70
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ export {};
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ /**
6
+ * @module fullscreen/fullscreenediting
7
+ */
8
+ import { Plugin, type Editor } from 'ckeditor5/src/core.js';
9
+ /**
10
+ * A plugin that registers the fullscreen mode command.
11
+ */
12
+ export default class FullscreenEditing extends Plugin {
13
+ /**
14
+ * @inheritDoc
15
+ */
16
+ static get pluginName(): "FullscreenEditing";
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ static get isOfficialPlugin(): true;
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ constructor(editor: Editor);
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ init(): void;
29
+ }
@@ -0,0 +1,59 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ /**
6
+ * @module fullscreen/fullscreenediting
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import FullscreenCommand from './fullscreencommand.js';
10
+ /**
11
+ * A plugin that registers the fullscreen mode command.
12
+ */
13
+ export default class FullscreenEditing extends Plugin {
14
+ /**
15
+ * @inheritDoc
16
+ */
17
+ static get pluginName() {
18
+ return 'FullscreenEditing';
19
+ }
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ static get isOfficialPlugin() {
24
+ return true;
25
+ }
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ constructor(editor) {
30
+ super(editor);
31
+ editor.config.define('fullscreen.menuBar.isVisible', true);
32
+ // By default, toolbar should behave the same way in fullscreen mode as in normal mode.
33
+ // This means that the toolbar buttons should be grouped when the toolbar is full.
34
+ editor.config.define('fullscreen.toolbar.shouldNotGroupWhenFull', editor.config.get('toolbar.shouldNotGroupWhenFull') === true);
35
+ }
36
+ /**
37
+ * @inheritDoc
38
+ */
39
+ init() {
40
+ this.editor.commands.add('toggleFullscreen', new FullscreenCommand(this.editor));
41
+ const t = this.editor.locale.t;
42
+ // Set the Ctrl+Shift+F keystroke.
43
+ this.editor.keystrokes.set('Ctrl+Shift+F', (evt, cancel) => {
44
+ this.editor.execute('toggleFullscreen');
45
+ this.editor.editing.view.focus();
46
+ cancel();
47
+ });
48
+ // Add the information about the keystroke to the accessibility database.
49
+ this.editor.accessibility.addKeystrokeInfos({
50
+ keystrokes: [
51
+ {
52
+ label: t('Toggle fullscreen mode'),
53
+ keystroke: 'CTRL+SHIFT+F'
54
+ }
55
+ ],
56
+ categoryId: 'navigation'
57
+ });
58
+ }
59
+ }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ /**
6
+ * @module fullscreen/fullscreenui
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import FullscreenEditing from './fullscreenediting.js';
10
+ import '../theme/fullscreen.css';
11
+ /**
12
+ * A plugin registering the fullscreen mode buttons.
13
+ */
14
+ export default class FullscreenUI extends Plugin {
15
+ /**
16
+ * @inheritDoc
17
+ */
18
+ static get requires(): readonly [typeof FullscreenEditing];
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ static get pluginName(): "FullscreenUI";
23
+ /**
24
+ * @inheritDoc
25
+ */
26
+ static get isOfficialPlugin(): true;
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ init(): void;
31
+ /**
32
+ * Creates a button that toggles the fullscreen mode.
33
+ */
34
+ private _createButton;
35
+ }
@@ -0,0 +1,76 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ /**
6
+ * @module fullscreen/fullscreenui
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import { ButtonView, MenuBarMenuListItemButtonView } from 'ckeditor5/src/ui.js';
10
+ import { IconFullscreenEnter, IconFullscreenLeave } from 'ckeditor5/src/icons.js';
11
+ import FullscreenEditing from './fullscreenediting.js';
12
+ import '../theme/fullscreen.css';
13
+ const COMMAND_NAME = 'toggleFullscreen';
14
+ /**
15
+ * A plugin registering the fullscreen mode buttons.
16
+ */
17
+ export default class FullscreenUI extends Plugin {
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static get requires() {
22
+ return [FullscreenEditing];
23
+ }
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static get pluginName() {
28
+ return 'FullscreenUI';
29
+ }
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ static get isOfficialPlugin() {
34
+ return true;
35
+ }
36
+ /**
37
+ * @inheritDoc
38
+ */
39
+ init() {
40
+ const editor = this.editor;
41
+ editor.ui.componentFactory.add('fullscreen', () => this._createButton(ButtonView));
42
+ editor.ui.componentFactory.add('menuBar:fullscreen', () => this._createButton(MenuBarMenuListItemButtonView));
43
+ }
44
+ /**
45
+ * Creates a button that toggles the fullscreen mode.
46
+ */
47
+ _createButton(ButtonClass) {
48
+ const editor = this.editor;
49
+ const t = editor.t;
50
+ const command = editor.commands.get(COMMAND_NAME);
51
+ const view = new ButtonClass(editor.locale);
52
+ view.set({
53
+ isToggleable: true
54
+ });
55
+ view.bind('isEnabled').to(command, 'isEnabled');
56
+ view.bind('isOn').to(command, 'value');
57
+ if ((view instanceof MenuBarMenuListItemButtonView)) {
58
+ view.set({
59
+ role: 'menuitemcheckbox',
60
+ label: t('Fullscreen mode')
61
+ });
62
+ }
63
+ else {
64
+ view.bind('icon').to(command, 'value', value => value ? IconFullscreenLeave : IconFullscreenEnter);
65
+ view.bind('label').to(command, 'value', value => value ? t('Leave fullscreen mode') : t('Enter fullscreen mode'));
66
+ view.set({
67
+ tooltip: true
68
+ });
69
+ }
70
+ this.listenTo(view, 'execute', () => {
71
+ editor.execute(COMMAND_NAME);
72
+ editor.editing.view.focus();
73
+ });
74
+ return view;
75
+ }
76
+ }
@@ -0,0 +1,146 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ import { type EventInfo } from 'ckeditor5/src/utils.js';
6
+ import type { ElementApi, Editor, EditorConfig } from 'ckeditor5/src/core.js';
7
+ import type { RevisionViewerEditor } from '@ckeditor/ckeditor5-revision-history';
8
+ /**
9
+ * The abstract editor type handler. It should be extended by the particular editor type handler.
10
+ */
11
+ export default class AbstractEditorHandler {
12
+ /**
13
+ * Maps placeholder names to placeholder elements and moved elements.
14
+ */
15
+ private _placeholderMap;
16
+ /**
17
+ * The wrapper element that holds the fullscreen mode layout.
18
+ */
19
+ private _wrapper;
20
+ /**
21
+ * The document object in which the editor is located.
22
+ */
23
+ private _document;
24
+ /**
25
+ * Data of the annotations UIs that were active before entering the fullscreen mode.
26
+ */
27
+ private _annotationsUIsData;
28
+ /**
29
+ * The pagination body collection that is used in the fullscreen mode.
30
+ * If we don't move pagination lines to the fullscreen container, they won't be visible.
31
+ */
32
+ private _paginationBodyCollection;
33
+ /**
34
+ * A callback that hides the document outline header when the source editing mode is enabled.
35
+ * Document outline element itself is hidden by source editing plugin.
36
+ */
37
+ private _sourceEditingCallback;
38
+ /**
39
+ * A map of elements that were hidden when entering the fullscreen mode.
40
+ * It is used to restore their previous visibility when leaving the fullscreen mode and avoid showing elements
41
+ * that were hidden before entering the fullscreen mode.
42
+ */
43
+ private _hiddenElements;
44
+ /**
45
+ * A callback that shows the revision viewer, stored to restore the original one after exiting the fullscreen mode.
46
+ */
47
+ protected _showRevisionViewerCallback: ((config?: EditorConfig) => Promise<RevisionViewerEditor | null>) | null;
48
+ /**
49
+ * A callback that closes the revision viewer, stored to restore the original one after exiting the fullscreen mode.
50
+ */
51
+ protected _closeRevisionViewerCallback: ((viewerEditor?: RevisionViewerEditor) => Promise<unknown>) | null;
52
+ /**
53
+ * An editor instance. It should be set by the particular editor type handler.
54
+ */
55
+ protected _editor: Editor & Partial<ElementApi>;
56
+ /**
57
+ * @inheritDoc
58
+ */
59
+ constructor(editor: Editor);
60
+ /**
61
+ * Moves the given element to the fullscreen mode container, leaving a placeholder in its place.
62
+ */
63
+ moveToFullscreen(elementToMove: HTMLElement, placeholderName: string): void;
64
+ /**
65
+ * Returns a single moved element to its original place.
66
+ */
67
+ restoreMovedElementLocation(placeholderName: string): void;
68
+ /**
69
+ * Returns the fullscreen mode container element.
70
+ */
71
+ getWrapper(): HTMLElement;
72
+ /**
73
+ * Enables the fullscreen mode. It executes the editor-specific enable handler and then the configured callback.
74
+ */
75
+ enable(): void;
76
+ /**
77
+ * Disables the fullscreen mode by restoring all moved elements and destroying the fullscreen container.
78
+ */
79
+ disable(): void;
80
+ /**
81
+ * @inheritDoc
82
+ */
83
+ destroy(): void;
84
+ /**
85
+ * A function that moves the editor UI elements to the fullscreen mode. It should be set by the particular editor type handler.
86
+ *
87
+ * Returns the fullscreen mode container element so it can be further customized via
88
+ * `fullscreen.onEnterCallback` configuration property.
89
+ */
90
+ protected _defaultOnEnter(): HTMLElement;
91
+ /**
92
+ * Destroys the fullscreen mode container.
93
+ */
94
+ private _destroyContainer;
95
+ /**
96
+ * Checks if the PresenceListUI plugin is available and moves its elements to fullscreen mode.
97
+ */
98
+ private _generatePresenceListContainer;
99
+ /**
100
+ * Checks if the DocumentOutlineUI plugin is available and moves its elements to fullscreen mode.
101
+ */
102
+ private _generateDocumentOutlineContainer;
103
+ /**
104
+ * Restores the default value of documentOutlineContainer, which is modified in fullscreen mode.
105
+ */
106
+ private _restoreDocumentOutlineDefaultContainer;
107
+ /**
108
+ * Stores the current state of the annotations UIs to restore it when leaving fullscreen mode.
109
+ */
110
+ private _overrideAnnotationsUIs;
111
+ /**
112
+ * Restores the saved state of the annotations UIs.
113
+ */
114
+ private _restoreAnnotationsUIs;
115
+ /**
116
+ * Modifies the revision history viewer callbacks to display the viewer in the fullscreen mode.
117
+ */
118
+ private _overrideRevisionHistoryCallbacks;
119
+ /**
120
+ * Resets the revision history viewer callbacks to their original values.
121
+ */
122
+ private _restoreRevisionHistoryCallbacks;
123
+ /**
124
+ * Adds an event listener when the dialog opens to adjust its position in fullscreen mode,
125
+ * utilizing the empty space on the right side of the editable element.
126
+ */
127
+ private _registerFullscreenDialogPositionAdjustments;
128
+ /**
129
+ * Removes an event listener that adjusts the dialog's position in fullscreen mode.
130
+ */
131
+ private _unregisterFullscreenDialogPositionAdjustments;
132
+ /**
133
+ * Stores a bound reference to the _updateDialogPosition method, allowing it to be attached and detached from change event.
134
+ */
135
+ updateDialogPositionCallback: (_evt: EventInfo, _name: string, isOpen: boolean) => void;
136
+ /**
137
+ * If dialog is open, adjust its positioning.
138
+ */
139
+ private _updateDialogPosition;
140
+ /**
141
+ * Adjusts the dialog position to utilize the empty space on the right side of the editable.
142
+ * The new dialog position should be on the right side of the fullscreen view with a 30px margin.
143
+ * Only dialogs with the position set to "editor-top-side" should have their position changed.
144
+ */
145
+ private _setNewDialogPosition;
146
+ }