@ckeditor/ckeditor5-table 44.3.0-alpha.7 → 45.0.0-alpha.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 (366) hide show
  1. package/LICENSE.md +1 -1
  2. package/build/table.js +2 -2
  3. package/build/translations/af.js +1 -1
  4. package/build/translations/ar.js +1 -1
  5. package/build/translations/ast.js +1 -1
  6. package/build/translations/az.js +1 -1
  7. package/build/translations/be.js +1 -0
  8. package/build/translations/bg.js +1 -1
  9. package/build/translations/bn.js +1 -1
  10. package/build/translations/bs.js +1 -1
  11. package/build/translations/ca.js +1 -1
  12. package/build/translations/cs.js +1 -1
  13. package/build/translations/da.js +1 -1
  14. package/build/translations/de-ch.js +1 -1
  15. package/build/translations/de.js +1 -1
  16. package/build/translations/el.js +1 -1
  17. package/build/translations/en-au.js +1 -1
  18. package/build/translations/en-gb.js +1 -1
  19. package/build/translations/eo.js +1 -1
  20. package/build/translations/es-co.js +1 -1
  21. package/build/translations/es.js +1 -1
  22. package/build/translations/et.js +1 -1
  23. package/build/translations/eu.js +1 -1
  24. package/build/translations/fa.js +1 -1
  25. package/build/translations/fi.js +1 -1
  26. package/build/translations/fr.js +1 -1
  27. package/build/translations/gl.js +1 -1
  28. package/build/translations/gu.js +1 -1
  29. package/build/translations/he.js +1 -1
  30. package/build/translations/hi.js +1 -1
  31. package/build/translations/hr.js +1 -1
  32. package/build/translations/hu.js +1 -1
  33. package/build/translations/hy.js +1 -1
  34. package/build/translations/id.js +1 -1
  35. package/build/translations/it.js +1 -1
  36. package/build/translations/ja.js +1 -1
  37. package/build/translations/jv.js +1 -1
  38. package/build/translations/kk.js +1 -1
  39. package/build/translations/km.js +1 -1
  40. package/build/translations/kn.js +1 -1
  41. package/build/translations/ko.js +1 -1
  42. package/build/translations/ku.js +1 -1
  43. package/build/translations/lt.js +1 -1
  44. package/build/translations/lv.js +1 -1
  45. package/build/translations/ms.js +1 -1
  46. package/build/translations/nb.js +1 -1
  47. package/build/translations/ne.js +1 -1
  48. package/build/translations/nl.js +1 -1
  49. package/build/translations/no.js +1 -1
  50. package/build/translations/oc.js +1 -1
  51. package/build/translations/pl.js +1 -1
  52. package/build/translations/pt-br.js +1 -1
  53. package/build/translations/pt.js +1 -1
  54. package/build/translations/ro.js +1 -1
  55. package/build/translations/ru.js +1 -1
  56. package/build/translations/si.js +1 -1
  57. package/build/translations/sk.js +1 -1
  58. package/build/translations/sl.js +1 -1
  59. package/build/translations/sq.js +1 -1
  60. package/build/translations/sr-latn.js +1 -1
  61. package/build/translations/sr.js +1 -1
  62. package/build/translations/sv.js +1 -1
  63. package/build/translations/th.js +1 -1
  64. package/build/translations/ti.js +1 -1
  65. package/build/translations/tk.js +1 -1
  66. package/build/translations/tr.js +1 -1
  67. package/build/translations/tt.js +1 -1
  68. package/build/translations/ug.js +1 -1
  69. package/build/translations/uk.js +1 -1
  70. package/build/translations/ur.js +1 -1
  71. package/build/translations/uz.js +1 -1
  72. package/build/translations/vi.js +1 -1
  73. package/build/translations/zh-cn.js +1 -1
  74. package/build/translations/zh.js +1 -1
  75. package/ckeditor5-metadata.json +64 -6
  76. package/dist/index-content.css +50 -25
  77. package/dist/index-editor.css +115 -16
  78. package/dist/index.css +226 -60
  79. package/dist/index.css.map +1 -1
  80. package/dist/index.js +2907 -2247
  81. package/dist/index.js.map +1 -1
  82. package/dist/translations/af.js +1 -1
  83. package/dist/translations/af.umd.js +1 -1
  84. package/dist/translations/ar.js +1 -1
  85. package/dist/translations/ar.umd.js +1 -1
  86. package/dist/translations/ast.js +1 -1
  87. package/dist/translations/ast.umd.js +1 -1
  88. package/dist/translations/az.js +1 -1
  89. package/dist/translations/az.umd.js +1 -1
  90. package/dist/translations/be.d.ts +8 -0
  91. package/dist/translations/be.js +5 -0
  92. package/dist/translations/be.umd.js +11 -0
  93. package/dist/translations/bg.js +1 -1
  94. package/dist/translations/bg.umd.js +1 -1
  95. package/dist/translations/bn.js +1 -1
  96. package/dist/translations/bn.umd.js +1 -1
  97. package/dist/translations/bs.js +1 -1
  98. package/dist/translations/bs.umd.js +1 -1
  99. package/dist/translations/ca.js +1 -1
  100. package/dist/translations/ca.umd.js +1 -1
  101. package/dist/translations/cs.js +1 -1
  102. package/dist/translations/cs.umd.js +1 -1
  103. package/dist/translations/da.js +1 -1
  104. package/dist/translations/da.umd.js +1 -1
  105. package/dist/translations/de-ch.js +1 -1
  106. package/dist/translations/de-ch.umd.js +1 -1
  107. package/dist/translations/de.js +1 -1
  108. package/dist/translations/de.umd.js +1 -1
  109. package/dist/translations/el.js +1 -1
  110. package/dist/translations/el.umd.js +1 -1
  111. package/dist/translations/en-au.js +1 -1
  112. package/dist/translations/en-au.umd.js +1 -1
  113. package/dist/translations/en-gb.js +1 -1
  114. package/dist/translations/en-gb.umd.js +1 -1
  115. package/dist/translations/en.js +1 -1
  116. package/dist/translations/en.umd.js +1 -1
  117. package/dist/translations/eo.js +1 -1
  118. package/dist/translations/eo.umd.js +1 -1
  119. package/dist/translations/es-co.js +1 -1
  120. package/dist/translations/es-co.umd.js +1 -1
  121. package/dist/translations/es.js +1 -1
  122. package/dist/translations/es.umd.js +1 -1
  123. package/dist/translations/et.js +1 -1
  124. package/dist/translations/et.umd.js +1 -1
  125. package/dist/translations/eu.js +1 -1
  126. package/dist/translations/eu.umd.js +1 -1
  127. package/dist/translations/fa.js +1 -1
  128. package/dist/translations/fa.umd.js +1 -1
  129. package/dist/translations/fi.js +1 -1
  130. package/dist/translations/fi.umd.js +1 -1
  131. package/dist/translations/fr.js +1 -1
  132. package/dist/translations/fr.umd.js +1 -1
  133. package/dist/translations/gl.js +1 -1
  134. package/dist/translations/gl.umd.js +1 -1
  135. package/dist/translations/gu.js +1 -1
  136. package/dist/translations/gu.umd.js +1 -1
  137. package/dist/translations/he.js +1 -1
  138. package/dist/translations/he.umd.js +1 -1
  139. package/dist/translations/hi.js +1 -1
  140. package/dist/translations/hi.umd.js +1 -1
  141. package/dist/translations/hr.js +1 -1
  142. package/dist/translations/hr.umd.js +1 -1
  143. package/dist/translations/hu.js +1 -1
  144. package/dist/translations/hu.umd.js +1 -1
  145. package/dist/translations/hy.js +1 -1
  146. package/dist/translations/hy.umd.js +1 -1
  147. package/dist/translations/id.js +1 -1
  148. package/dist/translations/id.umd.js +1 -1
  149. package/dist/translations/it.js +1 -1
  150. package/dist/translations/it.umd.js +1 -1
  151. package/dist/translations/ja.js +1 -1
  152. package/dist/translations/ja.umd.js +1 -1
  153. package/dist/translations/jv.js +1 -1
  154. package/dist/translations/jv.umd.js +1 -1
  155. package/dist/translations/kk.js +1 -1
  156. package/dist/translations/kk.umd.js +1 -1
  157. package/dist/translations/km.js +1 -1
  158. package/dist/translations/km.umd.js +1 -1
  159. package/dist/translations/kn.js +1 -1
  160. package/dist/translations/kn.umd.js +1 -1
  161. package/dist/translations/ko.js +1 -1
  162. package/dist/translations/ko.umd.js +1 -1
  163. package/dist/translations/ku.js +1 -1
  164. package/dist/translations/ku.umd.js +1 -1
  165. package/dist/translations/lt.js +1 -1
  166. package/dist/translations/lt.umd.js +1 -1
  167. package/dist/translations/lv.js +1 -1
  168. package/dist/translations/lv.umd.js +1 -1
  169. package/dist/translations/ms.js +1 -1
  170. package/dist/translations/ms.umd.js +1 -1
  171. package/dist/translations/nb.js +1 -1
  172. package/dist/translations/nb.umd.js +1 -1
  173. package/dist/translations/ne.js +1 -1
  174. package/dist/translations/ne.umd.js +1 -1
  175. package/dist/translations/nl.js +1 -1
  176. package/dist/translations/nl.umd.js +1 -1
  177. package/dist/translations/no.js +1 -1
  178. package/dist/translations/no.umd.js +1 -1
  179. package/dist/translations/oc.js +1 -1
  180. package/dist/translations/oc.umd.js +1 -1
  181. package/dist/translations/pl.js +1 -1
  182. package/dist/translations/pl.umd.js +1 -1
  183. package/dist/translations/pt-br.js +1 -1
  184. package/dist/translations/pt-br.umd.js +1 -1
  185. package/dist/translations/pt.js +1 -1
  186. package/dist/translations/pt.umd.js +1 -1
  187. package/dist/translations/ro.js +1 -1
  188. package/dist/translations/ro.umd.js +1 -1
  189. package/dist/translations/ru.js +1 -1
  190. package/dist/translations/ru.umd.js +1 -1
  191. package/dist/translations/si.js +1 -1
  192. package/dist/translations/si.umd.js +1 -1
  193. package/dist/translations/sk.js +1 -1
  194. package/dist/translations/sk.umd.js +1 -1
  195. package/dist/translations/sl.js +1 -1
  196. package/dist/translations/sl.umd.js +1 -1
  197. package/dist/translations/sq.js +1 -1
  198. package/dist/translations/sq.umd.js +1 -1
  199. package/dist/translations/sr-latn.js +1 -1
  200. package/dist/translations/sr-latn.umd.js +1 -1
  201. package/dist/translations/sr.js +1 -1
  202. package/dist/translations/sr.umd.js +1 -1
  203. package/dist/translations/sv.js +1 -1
  204. package/dist/translations/sv.umd.js +1 -1
  205. package/dist/translations/th.js +1 -1
  206. package/dist/translations/th.umd.js +1 -1
  207. package/dist/translations/ti.js +1 -1
  208. package/dist/translations/ti.umd.js +1 -1
  209. package/dist/translations/tk.js +1 -1
  210. package/dist/translations/tk.umd.js +1 -1
  211. package/dist/translations/tr.js +1 -1
  212. package/dist/translations/tr.umd.js +1 -1
  213. package/dist/translations/tt.js +1 -1
  214. package/dist/translations/tt.umd.js +1 -1
  215. package/dist/translations/ug.js +1 -1
  216. package/dist/translations/ug.umd.js +1 -1
  217. package/dist/translations/uk.js +1 -1
  218. package/dist/translations/uk.umd.js +1 -1
  219. package/dist/translations/ur.js +1 -1
  220. package/dist/translations/ur.umd.js +1 -1
  221. package/dist/translations/uz.js +1 -1
  222. package/dist/translations/uz.umd.js +1 -1
  223. package/dist/translations/vi.js +1 -1
  224. package/dist/translations/vi.umd.js +1 -1
  225. package/dist/translations/zh-cn.js +1 -1
  226. package/dist/translations/zh-cn.umd.js +1 -1
  227. package/dist/translations/zh.js +1 -1
  228. package/dist/translations/zh.umd.js +1 -1
  229. package/lang/contexts.json +8 -1
  230. package/lang/translations/af.po +28 -0
  231. package/lang/translations/ar.po +28 -0
  232. package/lang/translations/ast.po +28 -0
  233. package/lang/translations/az.po +28 -0
  234. package/lang/translations/be.po +296 -0
  235. package/lang/translations/bg.po +28 -0
  236. package/lang/translations/bn.po +28 -0
  237. package/lang/translations/bs.po +28 -0
  238. package/lang/translations/ca.po +28 -0
  239. package/lang/translations/cs.po +28 -0
  240. package/lang/translations/da.po +28 -0
  241. package/lang/translations/de-ch.po +28 -0
  242. package/lang/translations/de.po +28 -0
  243. package/lang/translations/el.po +28 -0
  244. package/lang/translations/en-au.po +28 -0
  245. package/lang/translations/en-gb.po +28 -0
  246. package/lang/translations/en.po +28 -0
  247. package/lang/translations/eo.po +28 -0
  248. package/lang/translations/es-co.po +28 -0
  249. package/lang/translations/es.po +28 -0
  250. package/lang/translations/et.po +28 -0
  251. package/lang/translations/eu.po +28 -0
  252. package/lang/translations/fa.po +28 -0
  253. package/lang/translations/fi.po +28 -0
  254. package/lang/translations/fr.po +28 -0
  255. package/lang/translations/gl.po +28 -0
  256. package/lang/translations/gu.po +28 -0
  257. package/lang/translations/he.po +28 -0
  258. package/lang/translations/hi.po +28 -0
  259. package/lang/translations/hr.po +28 -0
  260. package/lang/translations/hu.po +28 -0
  261. package/lang/translations/hy.po +28 -0
  262. package/lang/translations/id.po +28 -0
  263. package/lang/translations/it.po +28 -0
  264. package/lang/translations/ja.po +28 -0
  265. package/lang/translations/jv.po +28 -0
  266. package/lang/translations/kk.po +28 -0
  267. package/lang/translations/km.po +28 -0
  268. package/lang/translations/kn.po +28 -0
  269. package/lang/translations/ko.po +28 -0
  270. package/lang/translations/ku.po +28 -0
  271. package/lang/translations/lt.po +28 -0
  272. package/lang/translations/lv.po +28 -0
  273. package/lang/translations/ms.po +28 -0
  274. package/lang/translations/nb.po +28 -0
  275. package/lang/translations/ne.po +28 -0
  276. package/lang/translations/nl.po +28 -0
  277. package/lang/translations/no.po +28 -0
  278. package/lang/translations/oc.po +28 -0
  279. package/lang/translations/pl.po +28 -0
  280. package/lang/translations/pt-br.po +28 -0
  281. package/lang/translations/pt.po +28 -0
  282. package/lang/translations/ro.po +28 -0
  283. package/lang/translations/ru.po +28 -0
  284. package/lang/translations/si.po +28 -0
  285. package/lang/translations/sk.po +28 -0
  286. package/lang/translations/sl.po +28 -0
  287. package/lang/translations/sq.po +28 -0
  288. package/lang/translations/sr-latn.po +28 -0
  289. package/lang/translations/sr.po +28 -0
  290. package/lang/translations/sv.po +28 -0
  291. package/lang/translations/th.po +28 -0
  292. package/lang/translations/ti.po +28 -0
  293. package/lang/translations/tk.po +28 -0
  294. package/lang/translations/tr.po +28 -0
  295. package/lang/translations/tt.po +28 -0
  296. package/lang/translations/ug.po +28 -0
  297. package/lang/translations/uk.po +28 -0
  298. package/lang/translations/ur.po +28 -0
  299. package/lang/translations/uz.po +28 -0
  300. package/lang/translations/vi.po +28 -0
  301. package/lang/translations/zh-cn.po +28 -0
  302. package/lang/translations/zh.po +28 -0
  303. package/package.json +10 -9
  304. package/src/augmentation.d.ts +5 -1
  305. package/src/commands/insertcolumncommand.js +4 -0
  306. package/src/commands/insertrowcommand.js +4 -0
  307. package/src/commands/inserttablelayoutcommand.d.ts +39 -0
  308. package/src/commands/inserttablelayoutcommand.js +65 -0
  309. package/src/commands/mergecellcommand.js +8 -0
  310. package/src/commands/setheadercolumncommand.js +9 -4
  311. package/src/commands/setheaderrowcommand.js +8 -3
  312. package/src/commands/splitcellcommand.js +4 -0
  313. package/src/converters/downcast.js +1 -1
  314. package/src/index.d.ts +4 -0
  315. package/src/index.js +2 -0
  316. package/src/plaintableoutput.d.ts +3 -0
  317. package/src/plaintableoutput.js +12 -1
  318. package/src/tablecaption/tablecaptionediting.js +7 -0
  319. package/src/tablecaption/tablecaptionui.js +3 -2
  320. package/src/tablecaption/toggletablecaptioncommand.js +1 -1
  321. package/src/tablecellproperties/commands/tablecellpropertycommand.js +8 -0
  322. package/src/tablecellproperties/tablecellpropertiesui.js +25 -3
  323. package/src/tablecellproperties/ui/tablecellpropertiesview.d.ts +2 -1
  324. package/src/tablecellproperties/ui/tablecellpropertiesview.js +82 -13
  325. package/src/tableclipboard.d.ts +9 -0
  326. package/src/tableclipboard.js +28 -1
  327. package/src/tablecolumnresize/constants.d.ts +4 -0
  328. package/src/tablecolumnresize/constants.js +4 -0
  329. package/src/tablecolumnresize/tablecolumnresizeediting.d.ts +8 -0
  330. package/src/tablecolumnresize/tablecolumnresizeediting.js +50 -10
  331. package/src/tableconfig.d.ts +38 -0
  332. package/src/tableediting.js +4 -0
  333. package/src/tablelayout/commands/tabletypecommand.d.ts +43 -0
  334. package/src/tablelayout/commands/tabletypecommand.js +68 -0
  335. package/src/tablelayout/tablelayoutediting.d.ts +54 -0
  336. package/src/tablelayout/tablelayoutediting.js +276 -0
  337. package/src/tablelayout/tablelayoutui.d.ts +32 -0
  338. package/src/tablelayout/tablelayoutui.js +189 -0
  339. package/src/tablelayout.d.ts +31 -0
  340. package/src/tablelayout.js +37 -0
  341. package/src/tablemouse/mouseeventsobserver.js +3 -6
  342. package/src/tableproperties/commands/tablepropertycommand.js +8 -0
  343. package/src/tableproperties/tablepropertiesui.d.ts +8 -2
  344. package/src/tableproperties/tablepropertiesui.js +44 -19
  345. package/src/tableproperties/ui/tablepropertiesview.d.ts +2 -1
  346. package/src/tableproperties/ui/tablepropertiesview.js +70 -9
  347. package/src/tableselection.js +19 -1
  348. package/src/tableui.js +7 -9
  349. package/src/tablewalker.js +99 -4
  350. package/src/ui/colorinputview.js +34 -0
  351. package/src/ui/inserttableview.js +12 -0
  352. package/src/utils/structure.js +7 -1
  353. package/src/utils/table-properties.js +1 -1
  354. package/theme/formrow.css +0 -10
  355. package/theme/table.css +52 -35
  356. package/theme/tablecolumnresize.css +5 -0
  357. package/theme/tableform.css +6 -0
  358. package/theme/tablelayout.css +62 -0
  359. package/src/ui/formrowview.d.ts +0 -61
  360. package/src/ui/formrowview.js +0 -57
  361. package/theme/form.css +0 -11
  362. package/theme/icons/table-cell-properties.svg +0 -1
  363. package/theme/icons/table-column.svg +0 -1
  364. package/theme/icons/table-merge-cell.svg +0 -1
  365. package/theme/icons/table-properties.svg +0 -1
  366. package/theme/icons/table-row.svg +0 -1
@@ -2,42 +2,68 @@
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
- .ck-content .table{
6
- margin:0.9em auto;
7
- display:table;
8
- }
5
+ .ck-content[dir="rtl"] .table th{
6
+ text-align:right;
7
+ }
9
8
 
10
- .ck-content .table table{
9
+ .ck-content[dir="ltr"] .table th{
10
+ text-align:left;
11
+ }
12
+
13
+ .ck-content figure.table:not(.layout-table){
14
+ display:table;
15
+ }
16
+
17
+ .ck-content figure.table:not(.layout-table) > table{
18
+ width:100%;
19
+ height:100%;
20
+ }
21
+
22
+ .ck-content figure.table:not(.layout-table),
23
+ .ck-content table.table:not(.layout-table){
24
+ margin:0.9em auto;
25
+ }
26
+
27
+ .ck-content table.table:not(.layout-table),
28
+ .ck-content figure.table:not(.layout-table) > table{
11
29
  border-collapse:collapse;
12
30
  border-spacing:0;
13
- width:100%;
14
- height:100%;
15
31
  border:1px double hsl(0, 0%, 70%);
16
32
  }
17
33
 
18
- .ck-content .table table td,
19
- .ck-content .table table th{
20
- min-width:2em;
21
- padding:.4em;
22
- border:1px solid hsl(0, 0%, 75%);
23
- }
34
+ .ck-content table.table:not(.layout-table) > thead > tr > th, .ck-content figure.table:not(.layout-table) > table > thead > tr > th, .ck-content table.table:not(.layout-table) > tbody > tr > th, .ck-content figure.table:not(.layout-table) > table > tbody > tr > th{
35
+ font-weight:bold;
36
+ background:hsla(0, 0%, 0%, 5%);
37
+ }
24
38
 
25
- .ck-content .table table th{
26
- font-weight:bold;
27
- background:hsla(0, 0%, 0%, 5%);
28
- }
39
+ .ck-content table.table:not(.layout-table) > thead > tr > td,
40
+ .ck-content figure.table:not(.layout-table) > table > thead > tr > td,
41
+ .ck-content table.table:not(.layout-table) > tbody > tr > td,
42
+ .ck-content figure.table:not(.layout-table) > table > tbody > tr > td,
43
+ .ck-content table.table:not(.layout-table) > thead > tr > th,
44
+ .ck-content figure.table:not(.layout-table) > table > thead > tr > th,
45
+ .ck-content table.table:not(.layout-table) > tbody > tr > th,
46
+ .ck-content figure.table:not(.layout-table) > table > tbody > tr > th{
47
+ min-width:2em;
48
+ padding:.4em;
49
+ border:1px solid hsl(0, 0%, 75%);
50
+ }
29
51
  @media print{
30
- .ck-content .table table{
52
+ .ck-content figure.table > table{
31
53
  height:initial;
32
54
  }
33
55
  }
34
- .ck-content[dir="rtl"] .table th{
35
- text-align:right;
36
- }
37
56
 
38
- .ck-content[dir="ltr"] .table th{
39
- text-align:left;
40
- }
57
+ .ck-content table.table.layout-table,
58
+ .ck-content figure.table.layout-table{
59
+ margin-top:0;
60
+ margin-bottom:0;
61
+ }
62
+
63
+ .ck-content table.table.layout-table,
64
+ .ck-content figure.table.layout-table > table{
65
+ border-spacing:0;
66
+ }
41
67
 
42
68
  :root{
43
69
  --ck-color-selector-caption-background:hsl(0, 0%, 97%);
@@ -72,5 +98,4 @@
72
98
  .ck-content .table td,
73
99
  .ck-content .table th{
74
100
  overflow-wrap:break-word;
75
- position:relative;
76
101
  }
@@ -13,22 +13,6 @@
13
13
  flex-wrap:wrap;
14
14
  }
15
15
 
16
- .ck.ck-form__row{
17
- display:flex;
18
- flex-direction:row;
19
- flex-wrap:nowrap;
20
- justify-content:space-between;
21
- }
22
-
23
- .ck.ck-form__row > *:not(.ck-label){
24
- flex-grow:1;
25
- }
26
-
27
- .ck.ck-form__row.ck-table-form__action-row .ck-button-save,
28
- .ck.ck-form__row.ck-table-form__action-row .ck-button-cancel{
29
- justify-content:center;
30
- }
31
-
32
16
  .ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row{
33
17
  flex-wrap:wrap;
34
18
  }
@@ -78,6 +62,112 @@
78
62
  display:block;
79
63
  }
80
64
 
65
+ .ck-editor__editable.ck-editor__editable_inline > .ck-widget.ck-widget_with-selection-handle.layout-table:first-child{
66
+ margin-top:var(--ck-spacing-large);
67
+ }
68
+
69
+ .ck-editor__editable.ck-editor__editable_inline > .ck-widget.ck-widget_with-selection-handle.layout-table:last-child,
70
+
71
+ .ck-editor__editable.ck-editor__editable_inline > .ck-widget.ck-widget_with-selection-handle.layout-table:nth-last-child(2):has( + .ck-fake-selection-container){
72
+ margin-bottom:var(--ck-spacing-large);
73
+ }
74
+
75
+ .ck-editor__editable .table.layout-table{
76
+ display:table;
77
+ margin:0;
78
+ }
79
+
80
+ .ck-editor__editable .table.layout-table.ck-widget:hover > .ck-widget__selection-handle{
81
+ opacity:0.75;
82
+ visibility:visible;
83
+ }
84
+
85
+ .ck-editor__editable .table.layout-table.ck-widget:hover > .ck-widget__selection-handle:hover{
86
+ opacity:1;
87
+ }
88
+
89
+ .ck-editor__editable .table.layout-table.ck-widget:has( .ck-widget:hover) > .ck-widget__selection-handle{
90
+ opacity:0;
91
+ visibility:hidden;
92
+ }
93
+
94
+ :root{
95
+ --ck-form-default-width:340px;
96
+ }
97
+
98
+ .ck.ck-form{
99
+ padding:0 0 var(--ck-spacing-large);
100
+ }
101
+
102
+ .ck.ck-form.ck-form_default-width{
103
+ width:var(--ck-form-default-width);
104
+ }
105
+
106
+ .ck.ck-form:focus{
107
+ outline:none;
108
+ }
109
+
110
+ .ck.ck-form .ck.ck-input-text,
111
+ .ck.ck-form .ck.ck-input-number{
112
+ min-width:100%;
113
+ width:0;
114
+ }
115
+
116
+ .ck.ck-form .ck.ck-dropdown{
117
+ min-width:100%;
118
+ }
119
+
120
+ .ck.ck-form .ck.ck-dropdown .ck-dropdown__button:not(:focus){
121
+ border:1px solid var(--ck-color-base-border);
122
+ }
123
+
124
+ .ck.ck-form .ck.ck-dropdown .ck-dropdown__button .ck-button__label{
125
+ width:100%;
126
+ }
127
+
128
+ @media screen and (max-width: 600px){
129
+
130
+ .ck.ck-form.ck-responsive-form .ck.ck-form__row.ck-form__row_with-submit{
131
+ flex-direction:column;
132
+ align-items:stretch;
133
+ padding:0;
134
+ }
135
+ }
136
+
137
+ @media screen and (max-width: 600px){
138
+
139
+ .ck.ck-form.ck-responsive-form .ck.ck-form__row.ck-form__row_with-submit > .ck{
140
+ margin:var(--ck-spacing-large) var(--ck-spacing-large) 0;
141
+ }
142
+ }
143
+
144
+ @media screen and (max-width: 600px){
145
+
146
+ .ck.ck-form.ck-responsive-form .ck.ck-form__row.ck-form__row_with-submit .ck-button_with-text{
147
+ justify-content:center;
148
+ }
149
+ }
150
+
151
+ @media screen and (max-width: 600px){
152
+
153
+ .ck.ck-form.ck-responsive-form .ck.ck-form__row.ck-form__row_large-bottom-padding{
154
+ padding-bottom:var(--ck-spacing-large);
155
+ }
156
+ }
157
+
158
+ [dir="ltr"] .ck.ck-form.ck-responsive-form > :not(:first-child){
159
+ margin-left:0;
160
+ }
161
+
162
+ [dir="rtl"] .ck.ck-form.ck-responsive-form > :not(:last-child){
163
+ margin-left:0;
164
+ }
165
+
166
+ .ck.ck-form__row.ck-table-form__action-row .ck-button-save,
167
+ .ck.ck-form__row.ck-table-form__action-row .ck-button-cancel{
168
+ justify-content:center;
169
+ }
170
+
81
171
  .ck.ck-table-form .ck-form__row.ck-table-form__border-row{
82
172
  flex-wrap:wrap;
83
173
  }
@@ -105,6 +195,10 @@
105
195
  flex-grow:0;
106
196
  }
107
197
 
198
+ .ck.ck-table-form .ck-form__row > *:not(.ck-label, .ck-table-form__dimension-operator){
199
+ flex-grow:1;
200
+ }
201
+
108
202
  .ck.ck-table-form .ck.ck-labeled-field-view{
109
203
  position:relative;
110
204
  }
@@ -169,6 +263,11 @@
169
263
  --ck-table-column-resizer-position-offset:calc(var(--ck-table-column-resizer-width) * -0.5 - 0.5px);
170
264
  }
171
265
 
266
+ .ck.ck-editor__editable .table td,
267
+ .ck.ck-editor__editable .table th{
268
+ position:relative;
269
+ }
270
+
172
271
  .ck.ck-editor__editable .table .ck-table-column-resizer{
173
272
  position:absolute;
174
273
  top:0;
package/dist/index.css CHANGED
@@ -7,44 +7,73 @@
7
7
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
8
  */
9
9
 
10
- .ck-content .table {
11
- /* Give the table widget some air and center it horizontally */
12
- /* The first value should be equal to --ck-spacing-large variable if used in the editor context
13
- to avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */
14
- margin: 0.9em auto;
15
- display: table;
16
- }
10
+ /* Text alignment of the table header should match the editor settings and override the native browser styling,
11
+ when content is available outside the editor. See https://github.com/ckeditor/ckeditor5/issues/6638 */
17
12
 
18
- .ck-content .table table {
13
+ .ck-content[dir="rtl"] .table th {
14
+ text-align: right;
15
+ }
16
+
17
+ .ck-content[dir="ltr"] .table th {
18
+ text-align: left;
19
+ }
20
+
21
+ .ck-content figure.table:not(.layout-table) {
22
+ display: table;
23
+ }
24
+
25
+ .ck-content figure.table:not(.layout-table) > table {
26
+ width: 100%;
27
+ height: 100%;
28
+ }
29
+
30
+ .ck-content figure.table:not(.layout-table),
31
+ .ck-content table.table:not(.layout-table) {
32
+ /* Give the table widget some air and center it horizontally */
33
+ /* The first value should be equal to --ck-spacing-large variable if used in the editor context
34
+ to avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */
35
+ margin: 0.9em auto;
36
+ }
37
+
38
+ .ck-content table.table:not(.layout-table),
39
+ .ck-content figure.table:not(.layout-table) > table {
19
40
  /* The table cells should have slight borders */
20
41
  border-collapse: collapse;
21
42
  border-spacing: 0;
22
43
 
23
- /* Table width and height are set on the parent <figure>. Make sure the table inside stretches
24
- to the full dimensions of the container (https://github.com/ckeditor/ckeditor5/issues/6186). */
25
- width: 100%;
26
- height: 100%;
27
-
28
44
  /* The outer border of the table should be slightly darker than the inner lines.
29
45
  Also see https://github.com/ckeditor/ckeditor5-table/issues/50. */
30
46
  border: 1px double hsl(0, 0%, 70%);
31
47
  }
32
48
 
33
- .ck-content .table table td,
34
- .ck-content .table table th {
35
- min-width: 2em;
36
- padding: .4em;
49
+ /* The linter is disabled here because linter is confused when resolving the `table.table:not(.layout-table)`
50
+ and `figure.table:not(.layout-table) > table` selectors combined with below selectors.
51
+ There is no need to split it into two large structures with same code just to make linter happy. */
37
52
 
38
- /* The border is inherited from .ck-editor__nested-editable styles, so theoretically it's not necessary here.
39
- However, the border is a content style, so it should use .ck-content (so it works outside the editor).
40
- Hence, the duplication. See https://github.com/ckeditor/ckeditor5/issues/6314 */
41
- border: 1px solid hsl(0, 0%, 75%);
42
- }
53
+ /* stylelint-disable no-descending-specificity */
43
54
 
44
- .ck-content .table table th {
45
- font-weight: bold;
46
- background: hsla(0, 0%, 0%, 5%);
47
- }
55
+ .ck-content table.table:not(.layout-table) > thead > tr > th, .ck-content figure.table:not(.layout-table) > table > thead > tr > th, .ck-content table.table:not(.layout-table) > tbody > tr > th, .ck-content figure.table:not(.layout-table) > table > tbody > tr > th {
56
+ font-weight: bold;
57
+ background: hsla(0, 0%, 0%, 5%);
58
+ }
59
+
60
+ .ck-content table.table:not(.layout-table) > thead > tr > td,
61
+ .ck-content figure.table:not(.layout-table) > table > thead > tr > td,
62
+ .ck-content table.table:not(.layout-table) > tbody > tr > td,
63
+ .ck-content figure.table:not(.layout-table) > table > tbody > tr > td,
64
+ .ck-content table.table:not(.layout-table) > thead > tr > th,
65
+ .ck-content figure.table:not(.layout-table) > table > thead > tr > th,
66
+ .ck-content table.table:not(.layout-table) > tbody > tr > th,
67
+ .ck-content figure.table:not(.layout-table) > table > tbody > tr > th {
68
+ /* stylelint-enable no-descending-specificity */
69
+ min-width: 2em;
70
+ padding: .4em;
71
+
72
+ /* The border is inherited from .ck-editor__nested-editable styles, so theoretically it's not necessary here.
73
+ However, the border is a content style, so it should use .ck-content (so it works outside the editor).
74
+ Hence, the duplication. See https://github.com/ckeditor/ckeditor5/issues/6314 */
75
+ border: 1px solid hsl(0, 0%, 75%);
76
+ }
48
77
 
49
78
  /**
50
79
  * Expanding the table to the full height of the parent container is necessary because tables
@@ -58,21 +87,11 @@
58
87
  * For now, resetting the height to `initial` in the print mode works as a workaround.
59
88
  */
60
89
  @media print {
61
- .ck-content .table table {
90
+ .ck-content figure.table > table {
62
91
  height: initial;
63
92
  }
64
93
  }
65
94
 
66
- /* Text alignment of the table header should match the editor settings and override the native browser styling,
67
- when content is available outside the editor. See https://github.com/ckeditor/ckeditor5/issues/6638 */
68
- .ck-content[dir="rtl"] .table th {
69
- text-align: right;
70
- }
71
-
72
- .ck-content[dir="ltr"] .table th {
73
- text-align: left;
74
- }
75
-
76
95
  .ck-editor__editable .ck-table-bogus-paragraph {
77
96
  /*
78
97
  * Use display:inline-block to force Chrome/Safari to limit text mutations to this element.
@@ -98,29 +117,6 @@ when content is available outside the editor. See https://github.com/ckeditor/ck
98
117
  flex-wrap: wrap;
99
118
  }
100
119
 
101
- /*
102
- * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
103
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
104
- */
105
-
106
- .ck.ck-form__row {
107
- display: flex;
108
- flex-direction: row;
109
- flex-wrap: nowrap;
110
- justify-content: space-between;
111
-
112
- /* Ignore labels that work as fieldset legends */
113
- }
114
-
115
- .ck.ck-form__row > *:not(.ck-label) {
116
- flex-grow: 1;
117
- }
118
-
119
- .ck.ck-form__row.ck-table-form__action-row .ck-button-save,
120
- .ck.ck-form__row.ck-table-form__action-row .ck-button-cancel {
121
- justify-content: center;
122
- }
123
-
124
120
  /*
125
121
  * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
126
122
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
@@ -190,6 +186,163 @@ when content is available outside the editor. See https://github.com/ckeditor/ck
190
186
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
191
187
  */
192
188
 
189
+ .ck-editor__editable.ck-editor__editable_inline > .ck-widget.ck-widget_with-selection-handle.layout-table:first-child {
190
+ margin-top: var(--ck-spacing-large);
191
+ }
192
+
193
+ /*
194
+ * This value should match with the default margins of the block elements (like .media, .image or .table)
195
+ * to avoid a content jumping when the fake selection container shows up (See https://github.com/ckeditor/ckeditor5/issues/9825).
196
+ */
197
+
198
+ .ck-editor__editable.ck-editor__editable_inline > .ck-widget.ck-widget_with-selection-handle.layout-table:last-child,
199
+
200
+ .ck-editor__editable.ck-editor__editable_inline > .ck-widget.ck-widget_with-selection-handle.layout-table:nth-last-child(2):has( + .ck-fake-selection-container) {
201
+ margin-bottom: var(--ck-spacing-large);
202
+ }
203
+
204
+ .ck-editor__editable .table.layout-table {
205
+ display: table;
206
+ margin: 0;
207
+
208
+ /* Widget type around overrides. */
209
+ }
210
+
211
+ .ck-editor__editable .table.layout-table.ck-widget:hover > .ck-widget__selection-handle {
212
+ opacity: 0.75;
213
+ visibility: visible;
214
+ }
215
+
216
+ .ck-editor__editable .table.layout-table.ck-widget:hover > .ck-widget__selection-handle:hover {
217
+ opacity: 1;
218
+ }
219
+
220
+ /* Because of setting the opacity to 0.75 to the selection handle for the layout table,
221
+ it overrides the similar selector in widget (specificity is higher),
222
+ thats why we must override it here also. */
223
+
224
+ .ck-editor__editable .table.layout-table.ck-widget:has( .ck-widget:hover ) > .ck-widget__selection-handle {
225
+ opacity: 0;
226
+ visibility: hidden;
227
+ }
228
+
229
+ .ck-content table.table.layout-table,
230
+ .ck-content figure.table.layout-table {
231
+ /* Do not reserve space above and below the layout table. */
232
+ margin-top: 0;
233
+ margin-bottom: 0;
234
+ }
235
+
236
+ .ck-content table.table.layout-table,
237
+ .ck-content figure.table.layout-table > table {
238
+ border-spacing: 0;
239
+ }
240
+
241
+ /*
242
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
243
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
244
+ */
245
+
246
+ /*
247
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
248
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
249
+ */
250
+ /*
251
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
252
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
253
+ */
254
+
255
+ :root {
256
+ --ck-form-default-width: 340px;
257
+ }
258
+
259
+ .ck.ck-form {
260
+ padding: 0 0 var(--ck-spacing-large);
261
+ }
262
+
263
+ .ck.ck-form.ck-form_default-width {
264
+ width: var(--ck-form-default-width);
265
+ }
266
+
267
+ .ck.ck-form:focus {
268
+ outline: none;
269
+ }
270
+
271
+ .ck.ck-form .ck.ck-input-text,
272
+ .ck.ck-form .ck.ck-input-number {
273
+ min-width: 100%;
274
+ width: 0;
275
+ }
276
+
277
+ .ck.ck-form .ck.ck-dropdown {
278
+ min-width: 100%;
279
+ }
280
+
281
+ .ck.ck-form .ck.ck-dropdown .ck-dropdown__button:not(:focus) {
282
+ border: 1px solid var(--ck-color-base-border);
283
+ }
284
+
285
+ .ck.ck-form .ck.ck-dropdown .ck-dropdown__button .ck-button__label {
286
+ width: 100%;
287
+ }
288
+
289
+ /* Default `ck-responsive-form` customization when it lies next to `ck-form` class */
290
+
291
+ @media screen and (max-width: 600px) {
292
+
293
+ .ck.ck-form.ck-responsive-form .ck.ck-form__row.ck-form__row_with-submit {
294
+ flex-direction: column;
295
+ align-items: stretch;
296
+ padding: 0;
297
+ }
298
+ }
299
+
300
+ @media screen and (max-width: 600px) {
301
+
302
+ .ck.ck-form.ck-responsive-form .ck.ck-form__row.ck-form__row_with-submit > .ck {
303
+ margin: var(--ck-spacing-large) var(--ck-spacing-large) 0;
304
+ }
305
+ }
306
+
307
+ @media screen and (max-width: 600px) {
308
+
309
+ .ck.ck-form.ck-responsive-form .ck.ck-form__row.ck-form__row_with-submit .ck-button_with-text {
310
+ justify-content: center;
311
+ }
312
+ }
313
+
314
+ @media screen and (max-width: 600px) {
315
+
316
+ .ck.ck-form.ck-responsive-form .ck.ck-form__row.ck-form__row_large-bottom-padding {
317
+ padding-bottom: var(--ck-spacing-large);
318
+ }
319
+ }
320
+
321
+ [dir="ltr"] .ck.ck-form.ck-responsive-form > :not(:first-child) {
322
+ margin-left: 0;
323
+ }
324
+
325
+ [dir="rtl"] .ck.ck-form.ck-responsive-form > :not(:last-child) {
326
+ margin-left: 0;
327
+ }
328
+
329
+ /* End of `ck-responsive-form` customization */
330
+
331
+ /*
332
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
333
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
334
+ */
335
+
336
+ .ck.ck-form__row.ck-table-form__action-row .ck-button-save,
337
+ .ck.ck-form__row.ck-table-form__action-row .ck-button-cancel {
338
+ justify-content: center;
339
+ }
340
+
341
+ /*
342
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
343
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
344
+ */
345
+
193
346
  .ck.ck-table-form .ck-form__row.ck-table-form__border-row {
194
347
  flex-wrap: wrap;
195
348
  }
@@ -217,6 +370,14 @@ when content is available outside the editor. See https://github.com/ckeditor/ck
217
370
  flex-grow: 0;
218
371
  }
219
372
 
373
+ /* Ignore labels that work as fieldset legends */
374
+
375
+ /* Fallback for table dimension operator */
376
+
377
+ .ck.ck-table-form .ck-form__row > *:not(.ck-label, .ck-table-form__dimension-operator) {
378
+ flex-grow: 1;
379
+ }
380
+
220
381
  .ck.ck-table-form .ck.ck-labeled-field-view {
221
382
  /* Allow absolute positioning of the status (error) balloons. */
222
383
  position: relative;
@@ -350,6 +511,11 @@ when content is available outside the editor. See https://github.com/ckeditor/ck
350
511
  /* To prevent text overflowing beyond its cell when columns are resized by resize handler
351
512
  (https://github.com/ckeditor/ckeditor5/pull/14379#issuecomment-1589460978). */
352
513
  overflow-wrap: break-word;
514
+ }
515
+
516
+ .ck.ck-editor__editable .table td,
517
+ .ck.ck-editor__editable .table th {
518
+ /* The resizer element is placed inside each cell, so it must be positioned relatively to the cell. */
353
519
  position: relative;
354
520
  }
355
521