@ckeditor/ckeditor5-table 47.3.0 → 47.4.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.
- package/LICENSE.md +1 -1
- package/build/table.js +3 -3
- package/build/translations/af.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/ast.js +1 -1
- package/build/translations/az.js +1 -1
- package/build/translations/be.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/bs.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de-ch.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/en-gb.js +1 -1
- package/build/translations/eo.js +1 -1
- package/build/translations/es-co.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/eu.js +1 -1
- package/build/translations/fa.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/gu.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/hy.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/jv.js +1 -1
- package/build/translations/kk.js +1 -1
- package/build/translations/km.js +1 -1
- package/build/translations/kn.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/ku.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nb.js +1 -1
- package/build/translations/ne.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/oc.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/si.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sl.js +1 -1
- package/build/translations/sq.js +1 -1
- package/build/translations/sr-latn.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/ti.js +1 -1
- package/build/translations/tk.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/tt.js +1 -1
- package/build/translations/ug.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/ur.js +1 -1
- package/build/translations/uz.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/dist/index-content.css +5 -1
- package/dist/index-editor.css +77 -86
- package/dist/index.css +124 -127
- package/dist/index.css.map +1 -1
- package/dist/index.js +863 -138
- package/dist/index.js.map +1 -1
- package/dist/translations/af.d.ts +1 -1
- package/dist/translations/af.js +2 -2
- package/dist/translations/af.umd.js +2 -2
- package/dist/translations/ar.d.ts +1 -1
- package/dist/translations/ar.js +2 -2
- package/dist/translations/ar.umd.js +2 -2
- package/dist/translations/ast.d.ts +1 -1
- package/dist/translations/ast.js +2 -2
- package/dist/translations/ast.umd.js +2 -2
- package/dist/translations/az.d.ts +1 -1
- package/dist/translations/az.js +2 -2
- package/dist/translations/az.umd.js +2 -2
- package/dist/translations/be.d.ts +1 -1
- package/dist/translations/be.js +2 -2
- package/dist/translations/be.umd.js +2 -2
- package/dist/translations/bg.d.ts +1 -1
- package/dist/translations/bg.js +2 -2
- package/dist/translations/bg.umd.js +2 -2
- package/dist/translations/bn.d.ts +1 -1
- package/dist/translations/bn.js +2 -2
- package/dist/translations/bn.umd.js +2 -2
- package/dist/translations/bs.d.ts +1 -1
- package/dist/translations/bs.js +2 -2
- package/dist/translations/bs.umd.js +2 -2
- package/dist/translations/ca.d.ts +1 -1
- package/dist/translations/ca.js +2 -2
- package/dist/translations/ca.umd.js +2 -2
- package/dist/translations/cs.d.ts +1 -1
- package/dist/translations/cs.js +2 -2
- package/dist/translations/cs.umd.js +2 -2
- package/dist/translations/da.d.ts +1 -1
- package/dist/translations/da.js +2 -2
- package/dist/translations/da.umd.js +2 -2
- package/dist/translations/de-ch.d.ts +1 -1
- package/dist/translations/de-ch.js +2 -2
- package/dist/translations/de-ch.umd.js +2 -2
- package/dist/translations/de.d.ts +1 -1
- package/dist/translations/de.js +2 -2
- package/dist/translations/de.umd.js +2 -2
- package/dist/translations/el.d.ts +1 -1
- package/dist/translations/el.js +2 -2
- package/dist/translations/el.umd.js +2 -2
- package/dist/translations/en-au.d.ts +1 -1
- package/dist/translations/en-au.js +2 -2
- package/dist/translations/en-au.umd.js +2 -2
- package/dist/translations/en-gb.d.ts +1 -1
- package/dist/translations/en-gb.js +2 -2
- package/dist/translations/en-gb.umd.js +2 -2
- package/dist/translations/en.d.ts +1 -1
- package/dist/translations/en.js +2 -2
- package/dist/translations/en.umd.js +2 -2
- package/dist/translations/eo.d.ts +1 -1
- package/dist/translations/eo.js +2 -2
- package/dist/translations/eo.umd.js +2 -2
- package/dist/translations/es-co.d.ts +1 -1
- package/dist/translations/es-co.js +2 -2
- package/dist/translations/es-co.umd.js +2 -2
- package/dist/translations/es.d.ts +1 -1
- package/dist/translations/es.js +2 -2
- package/dist/translations/es.umd.js +2 -2
- package/dist/translations/et.d.ts +1 -1
- package/dist/translations/et.js +2 -2
- package/dist/translations/et.umd.js +2 -2
- package/dist/translations/eu.d.ts +1 -1
- package/dist/translations/eu.js +2 -2
- package/dist/translations/eu.umd.js +2 -2
- package/dist/translations/fa.d.ts +1 -1
- package/dist/translations/fa.js +2 -2
- package/dist/translations/fa.umd.js +2 -2
- package/dist/translations/fi.d.ts +1 -1
- package/dist/translations/fi.js +2 -2
- package/dist/translations/fi.umd.js +2 -2
- package/dist/translations/fr.d.ts +1 -1
- package/dist/translations/fr.js +2 -2
- package/dist/translations/fr.umd.js +2 -2
- package/dist/translations/gl.d.ts +1 -1
- package/dist/translations/gl.js +2 -2
- package/dist/translations/gl.umd.js +2 -2
- package/dist/translations/gu.d.ts +1 -1
- package/dist/translations/gu.js +2 -2
- package/dist/translations/gu.umd.js +2 -2
- package/dist/translations/he.d.ts +1 -1
- package/dist/translations/he.js +2 -2
- package/dist/translations/he.umd.js +2 -2
- package/dist/translations/hi.d.ts +1 -1
- package/dist/translations/hi.js +2 -2
- package/dist/translations/hi.umd.js +2 -2
- package/dist/translations/hr.d.ts +1 -1
- package/dist/translations/hr.js +2 -2
- package/dist/translations/hr.umd.js +2 -2
- package/dist/translations/hu.d.ts +1 -1
- package/dist/translations/hu.js +2 -2
- package/dist/translations/hu.umd.js +2 -2
- package/dist/translations/hy.d.ts +1 -1
- package/dist/translations/hy.js +2 -2
- package/dist/translations/hy.umd.js +2 -2
- package/dist/translations/id.d.ts +1 -1
- package/dist/translations/id.js +2 -2
- package/dist/translations/id.umd.js +2 -2
- package/dist/translations/it.d.ts +1 -1
- package/dist/translations/it.js +2 -2
- package/dist/translations/it.umd.js +2 -2
- package/dist/translations/ja.d.ts +1 -1
- package/dist/translations/ja.js +2 -2
- package/dist/translations/ja.umd.js +2 -2
- package/dist/translations/jv.d.ts +1 -1
- package/dist/translations/jv.js +2 -2
- package/dist/translations/jv.umd.js +2 -2
- package/dist/translations/kk.d.ts +1 -1
- package/dist/translations/kk.js +2 -2
- package/dist/translations/kk.umd.js +2 -2
- package/dist/translations/km.d.ts +1 -1
- package/dist/translations/km.js +2 -2
- package/dist/translations/km.umd.js +2 -2
- package/dist/translations/kn.d.ts +1 -1
- package/dist/translations/kn.js +2 -2
- package/dist/translations/kn.umd.js +2 -2
- package/dist/translations/ko.d.ts +1 -1
- package/dist/translations/ko.js +2 -2
- package/dist/translations/ko.umd.js +2 -2
- package/dist/translations/ku.d.ts +1 -1
- package/dist/translations/ku.js +2 -2
- package/dist/translations/ku.umd.js +2 -2
- package/dist/translations/lt.d.ts +1 -1
- package/dist/translations/lt.js +2 -2
- package/dist/translations/lt.umd.js +2 -2
- package/dist/translations/lv.d.ts +1 -1
- package/dist/translations/lv.js +2 -2
- package/dist/translations/lv.umd.js +2 -2
- package/dist/translations/ms.d.ts +1 -1
- package/dist/translations/ms.js +2 -2
- package/dist/translations/ms.umd.js +2 -2
- package/dist/translations/nb.d.ts +1 -1
- package/dist/translations/nb.js +2 -2
- package/dist/translations/nb.umd.js +2 -2
- package/dist/translations/ne.d.ts +1 -1
- package/dist/translations/ne.js +2 -2
- package/dist/translations/ne.umd.js +2 -2
- package/dist/translations/nl.d.ts +1 -1
- package/dist/translations/nl.js +2 -2
- package/dist/translations/nl.umd.js +2 -2
- package/dist/translations/no.d.ts +1 -1
- package/dist/translations/no.js +2 -2
- package/dist/translations/no.umd.js +2 -2
- package/dist/translations/oc.d.ts +1 -1
- package/dist/translations/oc.js +2 -2
- package/dist/translations/oc.umd.js +2 -2
- package/dist/translations/pl.d.ts +1 -1
- package/dist/translations/pl.js +2 -2
- package/dist/translations/pl.umd.js +2 -2
- package/dist/translations/pt-br.d.ts +1 -1
- package/dist/translations/pt-br.js +2 -2
- package/dist/translations/pt-br.umd.js +2 -2
- package/dist/translations/pt.d.ts +1 -1
- package/dist/translations/pt.js +2 -2
- package/dist/translations/pt.umd.js +2 -2
- package/dist/translations/ro.d.ts +1 -1
- package/dist/translations/ro.js +2 -2
- package/dist/translations/ro.umd.js +2 -2
- package/dist/translations/ru.d.ts +1 -1
- package/dist/translations/ru.js +2 -2
- package/dist/translations/ru.umd.js +2 -2
- package/dist/translations/si.d.ts +1 -1
- package/dist/translations/si.js +2 -2
- package/dist/translations/si.umd.js +2 -2
- package/dist/translations/sk.d.ts +1 -1
- package/dist/translations/sk.js +2 -2
- package/dist/translations/sk.umd.js +2 -2
- package/dist/translations/sl.d.ts +1 -1
- package/dist/translations/sl.js +2 -2
- package/dist/translations/sl.umd.js +2 -2
- package/dist/translations/sq.d.ts +1 -1
- package/dist/translations/sq.js +2 -2
- package/dist/translations/sq.umd.js +2 -2
- package/dist/translations/sr-latn.d.ts +1 -1
- package/dist/translations/sr-latn.js +2 -2
- package/dist/translations/sr-latn.umd.js +2 -2
- package/dist/translations/sr.d.ts +1 -1
- package/dist/translations/sr.js +2 -2
- package/dist/translations/sr.umd.js +2 -2
- package/dist/translations/sv.d.ts +1 -1
- package/dist/translations/sv.js +2 -2
- package/dist/translations/sv.umd.js +2 -2
- package/dist/translations/th.d.ts +1 -1
- package/dist/translations/th.js +2 -2
- package/dist/translations/th.umd.js +2 -2
- package/dist/translations/ti.d.ts +1 -1
- package/dist/translations/ti.js +2 -2
- package/dist/translations/ti.umd.js +2 -2
- package/dist/translations/tk.d.ts +1 -1
- package/dist/translations/tk.js +2 -2
- package/dist/translations/tk.umd.js +2 -2
- package/dist/translations/tr.d.ts +1 -1
- package/dist/translations/tr.js +2 -2
- package/dist/translations/tr.umd.js +2 -2
- package/dist/translations/tt.d.ts +1 -1
- package/dist/translations/tt.js +2 -2
- package/dist/translations/tt.umd.js +2 -2
- package/dist/translations/ug.d.ts +1 -1
- package/dist/translations/ug.js +2 -2
- package/dist/translations/ug.umd.js +2 -2
- package/dist/translations/uk.d.ts +1 -1
- package/dist/translations/uk.js +2 -2
- package/dist/translations/uk.umd.js +2 -2
- package/dist/translations/ur.d.ts +1 -1
- package/dist/translations/ur.js +2 -2
- package/dist/translations/ur.umd.js +2 -2
- package/dist/translations/uz.d.ts +1 -1
- package/dist/translations/uz.js +2 -2
- package/dist/translations/uz.umd.js +2 -2
- package/dist/translations/vi.d.ts +1 -1
- package/dist/translations/vi.js +2 -2
- package/dist/translations/vi.umd.js +2 -2
- package/dist/translations/zh-cn.d.ts +1 -1
- package/dist/translations/zh-cn.js +2 -2
- package/dist/translations/zh-cn.umd.js +2 -2
- package/dist/translations/zh.d.ts +1 -1
- package/dist/translations/zh.js +2 -2
- package/dist/translations/zh.umd.js +2 -2
- package/lang/contexts.json +3 -0
- package/lang/translations/af.po +13 -1
- package/lang/translations/ar.po +13 -1
- package/lang/translations/ast.po +13 -1
- package/lang/translations/az.po +13 -1
- package/lang/translations/be.po +13 -1
- package/lang/translations/bg.po +13 -1
- package/lang/translations/bn.po +13 -1
- package/lang/translations/bs.po +13 -1
- package/lang/translations/ca.po +13 -1
- package/lang/translations/cs.po +13 -1
- package/lang/translations/da.po +13 -1
- package/lang/translations/de-ch.po +13 -1
- package/lang/translations/de.po +13 -1
- package/lang/translations/el.po +13 -1
- package/lang/translations/en-au.po +13 -1
- package/lang/translations/en-gb.po +13 -1
- package/lang/translations/en.po +13 -1
- package/lang/translations/eo.po +13 -1
- package/lang/translations/es-co.po +13 -1
- package/lang/translations/es.po +13 -1
- package/lang/translations/et.po +13 -1
- package/lang/translations/eu.po +13 -1
- package/lang/translations/fa.po +13 -1
- package/lang/translations/fi.po +13 -1
- package/lang/translations/fr.po +13 -1
- package/lang/translations/gl.po +13 -1
- package/lang/translations/gu.po +13 -1
- package/lang/translations/he.po +13 -1
- package/lang/translations/hi.po +13 -1
- package/lang/translations/hr.po +13 -1
- package/lang/translations/hu.po +13 -1
- package/lang/translations/hy.po +13 -1
- package/lang/translations/id.po +13 -1
- package/lang/translations/it.po +13 -1
- package/lang/translations/ja.po +13 -1
- package/lang/translations/jv.po +13 -1
- package/lang/translations/kk.po +13 -1
- package/lang/translations/km.po +13 -1
- package/lang/translations/kn.po +13 -1
- package/lang/translations/ko.po +13 -1
- package/lang/translations/ku.po +13 -1
- package/lang/translations/lt.po +13 -1
- package/lang/translations/lv.po +13 -1
- package/lang/translations/ms.po +13 -1
- package/lang/translations/nb.po +13 -1
- package/lang/translations/ne.po +13 -1
- package/lang/translations/nl.po +13 -1
- package/lang/translations/no.po +13 -1
- package/lang/translations/oc.po +13 -1
- package/lang/translations/pl.po +13 -1
- package/lang/translations/pt-br.po +13 -1
- package/lang/translations/pt.po +13 -1
- package/lang/translations/ro.po +13 -1
- package/lang/translations/ru.po +13 -1
- package/lang/translations/si.po +13 -1
- package/lang/translations/sk.po +13 -1
- package/lang/translations/sl.po +13 -1
- package/lang/translations/sq.po +13 -1
- package/lang/translations/sr-latn.po +13 -1
- package/lang/translations/sr.po +13 -1
- package/lang/translations/sv.po +13 -1
- package/lang/translations/th.po +13 -1
- package/lang/translations/ti.po +13 -1
- package/lang/translations/tk.po +13 -1
- package/lang/translations/tr.po +13 -1
- package/lang/translations/tt.po +13 -1
- package/lang/translations/ug.po +13 -1
- package/lang/translations/uk.po +13 -1
- package/lang/translations/ur.po +13 -1
- package/lang/translations/uz.po +13 -1
- package/lang/translations/vi.po +13 -1
- package/lang/translations/zh-cn.po +13 -1
- package/lang/translations/zh.po +13 -1
- package/package.json +10 -10
- package/src/augmentation.d.ts +11 -2
- package/src/augmentation.js +1 -1
- package/src/commands/insertcolumncommand.d.ts +1 -1
- package/src/commands/insertcolumncommand.js +1 -1
- package/src/commands/insertrowcommand.d.ts +1 -1
- package/src/commands/insertrowcommand.js +1 -1
- package/src/commands/inserttablecommand.d.ts +1 -1
- package/src/commands/inserttablecommand.js +1 -1
- package/src/commands/inserttablelayoutcommand.d.ts +1 -1
- package/src/commands/inserttablelayoutcommand.js +1 -1
- package/src/commands/mergecellcommand.d.ts +1 -1
- package/src/commands/mergecellcommand.js +1 -1
- package/src/commands/mergecellscommand.d.ts +1 -1
- package/src/commands/mergecellscommand.js +1 -1
- package/src/commands/removecolumncommand.d.ts +1 -1
- package/src/commands/removecolumncommand.js +1 -1
- package/src/commands/removerowcommand.d.ts +1 -1
- package/src/commands/removerowcommand.js +1 -1
- package/src/commands/selectcolumncommand.d.ts +1 -1
- package/src/commands/selectcolumncommand.js +1 -1
- package/src/commands/selectrowcommand.d.ts +1 -1
- package/src/commands/selectrowcommand.js +1 -1
- package/src/commands/setheadercolumncommand.d.ts +1 -1
- package/src/commands/setheadercolumncommand.js +3 -3
- package/src/commands/setheaderrowcommand.d.ts +1 -1
- package/src/commands/setheaderrowcommand.js +2 -3
- package/src/commands/splitcellcommand.d.ts +1 -1
- package/src/commands/splitcellcommand.js +1 -1
- package/src/converters/downcast.d.ts +5 -3
- package/src/converters/downcast.js +21 -9
- package/src/converters/table-caption-post-fixer.d.ts +1 -1
- package/src/converters/table-caption-post-fixer.js +1 -1
- package/src/converters/table-cell-paragraph-post-fixer.d.ts +1 -1
- package/src/converters/table-cell-paragraph-post-fixer.js +1 -1
- package/src/converters/table-cell-refresh-handler.d.ts +1 -1
- package/src/converters/table-cell-refresh-handler.js +1 -1
- package/src/converters/table-headings-refresh-handler.d.ts +1 -1
- package/src/converters/table-headings-refresh-handler.js +1 -1
- package/src/converters/table-layout-post-fixer.d.ts +1 -1
- package/src/converters/table-layout-post-fixer.js +1 -1
- package/src/converters/tableproperties.d.ts +1 -1
- package/src/converters/tableproperties.js +1 -1
- package/src/converters/upcasttable.d.ts +1 -1
- package/src/converters/upcasttable.js +13 -6
- package/src/index.d.ts +3 -2
- package/src/index.js +3 -2
- package/src/plaintableoutput.d.ts +1 -1
- package/src/plaintableoutput.js +1 -1
- package/src/table.d.ts +1 -1
- package/src/table.js +1 -1
- package/src/tablecaption/tablecaptionediting.d.ts +1 -1
- package/src/tablecaption/tablecaptionediting.js +1 -1
- package/src/tablecaption/tablecaptionui.d.ts +1 -1
- package/src/tablecaption/tablecaptionui.js +1 -1
- package/src/tablecaption/toggletablecaptioncommand.d.ts +1 -1
- package/src/tablecaption/toggletablecaptioncommand.js +1 -1
- package/src/tablecaption/utils.d.ts +1 -1
- package/src/tablecaption/utils.js +1 -1
- package/src/tablecaption.d.ts +1 -1
- package/src/tablecaption.js +1 -1
- package/src/tablecellproperties/commands/tablecellbackgroundcolorcommand.d.ts +1 -1
- package/src/tablecellproperties/commands/tablecellbackgroundcolorcommand.js +1 -1
- package/src/tablecellproperties/commands/tablecellbordercolorcommand.d.ts +1 -1
- package/src/tablecellproperties/commands/tablecellbordercolorcommand.js +1 -1
- package/src/tablecellproperties/commands/tablecellborderstylecommand.d.ts +1 -1
- package/src/tablecellproperties/commands/tablecellborderstylecommand.js +1 -1
- package/src/tablecellproperties/commands/tablecellborderwidthcommand.d.ts +1 -1
- package/src/tablecellproperties/commands/tablecellborderwidthcommand.js +1 -1
- package/src/tablecellproperties/commands/tablecellheightcommand.d.ts +1 -1
- package/src/tablecellproperties/commands/tablecellheightcommand.js +1 -1
- package/src/tablecellproperties/commands/tablecellhorizontalalignmentcommand.d.ts +1 -1
- package/src/tablecellproperties/commands/tablecellhorizontalalignmentcommand.js +1 -1
- package/src/tablecellproperties/commands/tablecellpaddingcommand.d.ts +1 -1
- package/src/tablecellproperties/commands/tablecellpaddingcommand.js +1 -1
- package/src/tablecellproperties/commands/tablecellpropertycommand.d.ts +20 -2
- package/src/tablecellproperties/commands/tablecellpropertycommand.js +9 -1
- package/src/tablecellproperties/commands/tablecelltypecommand.d.ts +53 -0
- package/src/tablecellproperties/commands/tablecelltypecommand.js +167 -0
- package/src/tablecellproperties/commands/tablecellverticalalignmentcommand.d.ts +1 -1
- package/src/tablecellproperties/commands/tablecellverticalalignmentcommand.js +1 -1
- package/src/tablecellproperties/tablecellpropertiesediting.d.ts +1 -4
- package/src/tablecellproperties/tablecellpropertiesediting.js +121 -1
- package/src/tablecellproperties/tablecellpropertiesui.d.ts +1 -1
- package/src/tablecellproperties/tablecellpropertiesui.js +1 -1
- package/src/tablecellproperties/tablecellpropertiesuiexperimental.d.ts +1 -1
- package/src/tablecellproperties/tablecellpropertiesuiexperimental.js +34 -12
- package/src/tablecellproperties/ui/tablecellpropertiesview.d.ts +1 -1
- package/src/tablecellproperties/ui/tablecellpropertiesview.js +1 -1
- package/src/tablecellproperties/ui/tablecellpropertiesviewexperimental.d.ts +33 -4
- package/src/tablecellproperties/ui/tablecellpropertiesviewexperimental.js +130 -19
- package/src/tablecellproperties.d.ts +1 -1
- package/src/tablecellproperties.js +1 -1
- package/src/tablecellwidth/commands/tablecellwidthcommand.d.ts +1 -1
- package/src/tablecellwidth/commands/tablecellwidthcommand.js +1 -1
- package/src/tablecellwidth/tablecellwidthediting.d.ts +1 -1
- package/src/tablecellwidth/tablecellwidthediting.js +1 -1
- package/src/tableclipboard.d.ts +1 -1
- package/src/tableclipboard.js +1 -1
- package/src/tablecolumnresize/constants.d.ts +1 -1
- package/src/tablecolumnresize/constants.js +1 -1
- package/src/tablecolumnresize/converters.d.ts +1 -1
- package/src/tablecolumnresize/converters.js +1 -1
- package/src/tablecolumnresize/tablecolumnresizeediting.d.ts +1 -1
- package/src/tablecolumnresize/tablecolumnresizeediting.js +1 -1
- package/src/tablecolumnresize/tablewidthscommand.d.ts +1 -1
- package/src/tablecolumnresize/tablewidthscommand.js +1 -1
- package/src/tablecolumnresize/utils.d.ts +1 -1
- package/src/tablecolumnresize/utils.js +1 -1
- package/src/tablecolumnresize.d.ts +1 -1
- package/src/tablecolumnresize.js +1 -1
- package/src/tableconfig.d.ts +19 -1
- package/src/tableconfig.js +1 -1
- package/src/tableediting.d.ts +1 -1
- package/src/tableediting.js +24 -6
- package/src/tablekeyboard.d.ts +1 -1
- package/src/tablekeyboard.js +1 -1
- package/src/tablelayout/commands/tabletypecommand.d.ts +1 -1
- package/src/tablelayout/commands/tabletypecommand.js +1 -1
- package/src/tablelayout/tablelayoutediting.d.ts +1 -1
- package/src/tablelayout/tablelayoutediting.js +1 -1
- package/src/tablelayout/tablelayoutui.d.ts +1 -1
- package/src/tablelayout/tablelayoutui.js +12 -5
- package/src/tablelayout.d.ts +1 -1
- package/src/tablelayout.js +1 -1
- package/src/tablemouse/mouseeventsobserver.d.ts +1 -1
- package/src/tablemouse/mouseeventsobserver.js +1 -1
- package/src/tablemouse.d.ts +1 -1
- package/src/tablemouse.js +1 -1
- package/src/tableproperties/commands/tablealignmentcommand.d.ts +1 -1
- package/src/tableproperties/commands/tablealignmentcommand.js +1 -1
- package/src/tableproperties/commands/tablebackgroundcolorcommand.d.ts +1 -1
- package/src/tableproperties/commands/tablebackgroundcolorcommand.js +1 -1
- package/src/tableproperties/commands/tablebordercolorcommand.d.ts +1 -1
- package/src/tableproperties/commands/tablebordercolorcommand.js +1 -1
- package/src/tableproperties/commands/tableborderstylecommand.d.ts +1 -1
- package/src/tableproperties/commands/tableborderstylecommand.js +1 -1
- package/src/tableproperties/commands/tableborderwidthcommand.d.ts +1 -1
- package/src/tableproperties/commands/tableborderwidthcommand.js +1 -1
- package/src/tableproperties/commands/tableheightcommand.d.ts +1 -1
- package/src/tableproperties/commands/tableheightcommand.js +1 -1
- package/src/tableproperties/commands/tablepropertycommand.d.ts +1 -1
- package/src/tableproperties/commands/tablepropertycommand.js +1 -1
- package/src/tableproperties/commands/tablewidthcommand.d.ts +1 -1
- package/src/tableproperties/commands/tablewidthcommand.js +1 -1
- package/src/tableproperties/tablepropertiesediting.d.ts +1 -1
- package/src/tableproperties/tablepropertiesediting.js +1 -1
- package/src/tableproperties/tablepropertiesui.d.ts +1 -1
- package/src/tableproperties/tablepropertiesui.js +1 -1
- package/src/tableproperties/tablepropertiesuiexperimental.d.ts +1 -1
- package/src/tableproperties/tablepropertiesuiexperimental.js +1 -1
- package/src/tableproperties/ui/tablepropertiesview.d.ts +1 -1
- package/src/tableproperties/ui/tablepropertiesview.js +1 -1
- package/src/tableproperties/ui/tablepropertiesviewexperimental.d.ts +1 -1
- package/src/tableproperties/ui/tablepropertiesviewexperimental.js +1 -1
- package/src/tableproperties.d.ts +1 -1
- package/src/tableproperties.js +1 -1
- package/src/tableselection.d.ts +1 -1
- package/src/tableselection.js +1 -1
- package/src/tabletoolbar.d.ts +1 -1
- package/src/tabletoolbar.js +1 -1
- package/src/tableui.d.ts +1 -1
- package/src/tableui.js +1 -1
- package/src/tableutils.d.ts +39 -1
- package/src/tableutils.js +220 -14
- package/src/tablewalker.d.ts +1 -1
- package/src/tablewalker.js +1 -1
- package/src/ui/colorinputview.d.ts +1 -1
- package/src/ui/colorinputview.js +1 -1
- package/src/ui/inserttableview.d.ts +1 -1
- package/src/ui/inserttableview.js +1 -1
- package/src/utils/common.d.ts +24 -1
- package/src/utils/common.js +43 -1
- package/src/utils/structure.d.ts +1 -1
- package/src/utils/structure.js +1 -1
- package/src/utils/table-properties.d.ts +1 -1
- package/src/utils/table-properties.js +1 -1
- package/src/utils/ui/contextualballoon.d.ts +1 -1
- package/src/utils/ui/contextualballoon.js +1 -1
- package/src/utils/ui/table-properties.d.ts +1 -1
- package/src/utils/ui/table-properties.js +1 -1
- package/src/utils/ui/table-propertiesexperimental.d.ts +1 -1
- package/src/utils/ui/table-propertiesexperimental.js +1 -1
- package/src/utils/ui/widget.d.ts +1 -1
- package/src/utils/ui/widget.js +1 -1
- package/theme/colorinput.css +1 -1
- package/theme/formrow-experimental.css +1 -1
- package/theme/formrow.css +1 -1
- package/theme/inserttable.css +1 -1
- package/theme/table.css +7 -2
- package/theme/tablecaption.css +1 -1
- package/theme/tablecellproperties-experimental.css +4 -0
- package/theme/tablecellproperties.css +1 -1
- package/theme/tablecolumnresize.css +1 -1
- package/theme/tableediting.css +1 -1
- package/theme/tableform-experimental.css +1 -13
- package/theme/tableform.css +6 -7
- package/theme/tablelayout.css +1 -1
- package/theme/tableproperties-experimental.css +1 -1
- package/theme/tableproperties.css +1 -1
- package/theme/tableselection.css +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2026, 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
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2026, 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
5
|
import { TableCellPropertyCommand } from './tablecellpropertycommand.js';
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2026, 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
|
-
/**
|
|
6
|
-
* @module table/tablecellproperties/tablecellpropertiesediting
|
|
7
|
-
*/
|
|
8
5
|
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
6
|
import { TableEditing } from './../tableediting.js';
|
|
10
7
|
import { TableCellWidthEditing } from '../tablecellwidth/tablecellwidthediting.js';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2026, 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
5
|
/**
|
|
6
6
|
* @module table/tablecellproperties/tablecellpropertiesediting
|
|
7
7
|
*/
|
|
8
|
+
import { priorities } from 'ckeditor5/src/utils.js';
|
|
8
9
|
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
10
|
import { addBorderStylesRules, addPaddingStylesRules, addBackgroundStylesRules } from 'ckeditor5/src/engine.js';
|
|
10
11
|
import { downcastAttributeToStyle, getDefaultValueAdjusted, upcastBorderStyles } from '../converters/tableproperties.js';
|
|
@@ -18,8 +19,11 @@ import { TableCellHorizontalAlignmentCommand } from './commands/tablecellhorizon
|
|
|
18
19
|
import { TableCellBorderStyleCommand } from './commands/tablecellborderstylecommand.js';
|
|
19
20
|
import { TableCellBorderColorCommand } from './commands/tablecellbordercolorcommand.js';
|
|
20
21
|
import { TableCellBorderWidthCommand } from './commands/tablecellborderwidthcommand.js';
|
|
22
|
+
import { TableCellTypeCommand, updateTablesHeadingAttributes } from './commands/tablecelltypecommand.js';
|
|
21
23
|
import { getNormalizedDefaultCellProperties } from '../utils/table-properties.js';
|
|
22
24
|
import { enableProperty } from '../utils/common.js';
|
|
25
|
+
import { TableUtils } from '../tableutils.js';
|
|
26
|
+
import { TableWalker } from '../tablewalker.js';
|
|
23
27
|
const VALIGN_VALUES_REG_EXP = /^(top|middle|bottom)$/;
|
|
24
28
|
const ALIGN_VALUES_REG_EXP = /^(left|center|right|justify)$/;
|
|
25
29
|
/**
|
|
@@ -125,6 +129,10 @@ export class TableCellPropertiesEditing extends Plugin {
|
|
|
125
129
|
editor.commands.add('tableCellHorizontalAlignment', new TableCellHorizontalAlignmentCommand(editor, defaultTableCellProperties.horizontalAlignment));
|
|
126
130
|
enableVerticalAlignmentProperty(schema, conversion, defaultTableCellProperties.verticalAlignment);
|
|
127
131
|
editor.commands.add('tableCellVerticalAlignment', new TableCellVerticalAlignmentCommand(editor, defaultTableCellProperties.verticalAlignment));
|
|
132
|
+
if (editor.config.get('experimentalFlags.tableCellTypeSupport')) {
|
|
133
|
+
enableCellTypeProperty(editor);
|
|
134
|
+
editor.commands.add('tableCellType', new TableCellTypeCommand(editor));
|
|
135
|
+
}
|
|
128
136
|
}
|
|
129
137
|
}
|
|
130
138
|
/**
|
|
@@ -290,3 +298,115 @@ function enableVerticalAlignmentProperty(schema, conversion, defaultValue) {
|
|
|
290
298
|
}
|
|
291
299
|
});
|
|
292
300
|
}
|
|
301
|
+
/**
|
|
302
|
+
* Enables the `tableCellType` attribute for table cells.
|
|
303
|
+
*/
|
|
304
|
+
function enableCellTypeProperty(editor) {
|
|
305
|
+
const { model, conversion, editing } = editor;
|
|
306
|
+
const { schema } = model;
|
|
307
|
+
const tableUtils = editor.plugins.get(TableUtils);
|
|
308
|
+
schema.extend('tableCell', {
|
|
309
|
+
allowAttributes: ['tableCellType']
|
|
310
|
+
});
|
|
311
|
+
schema.setAttributeProperties('tableCellType', {
|
|
312
|
+
isFormatting: true
|
|
313
|
+
});
|
|
314
|
+
// Do not allow setting `tableCellType` in layout tables.
|
|
315
|
+
schema.addAttributeCheck(context => {
|
|
316
|
+
const nearestTable = Array.from(context).reverse().find(item => item.name === 'table');
|
|
317
|
+
if (nearestTable?.getAttribute('tableType') === 'layout') {
|
|
318
|
+
return false;
|
|
319
|
+
}
|
|
320
|
+
}, 'tableCellType');
|
|
321
|
+
// Upcast conversion for td/th elements.
|
|
322
|
+
conversion.for('upcast').add(dispatcher => {
|
|
323
|
+
dispatcher.on('element:th', (evt, data, conversionApi) => {
|
|
324
|
+
const { writer } = conversionApi;
|
|
325
|
+
const { modelRange } = data;
|
|
326
|
+
const modelElement = modelRange?.start.nodeAfter;
|
|
327
|
+
if (modelElement?.is('element', 'tableCell')) {
|
|
328
|
+
writer.setAttribute('tableCellType', 'header', modelElement);
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
// Table type is examined after all other cell converters, on low priority, so
|
|
332
|
+
// we double check if there is any `th` left in the table. If so, the table is converted to a content table.
|
|
333
|
+
dispatcher.on('element:table', (evt, data, conversionApi) => {
|
|
334
|
+
const { writer } = conversionApi;
|
|
335
|
+
const { modelRange } = data;
|
|
336
|
+
const modelElement = modelRange?.start.nodeAfter;
|
|
337
|
+
if (modelElement?.is('element', 'table') && modelElement.getAttribute('tableType') === 'layout') {
|
|
338
|
+
for (const { cell } of new TableWalker(modelElement)) {
|
|
339
|
+
if (cell.getAttribute('tableCellType') === 'header') {
|
|
340
|
+
writer.setAttribute('tableType', 'content', modelElement);
|
|
341
|
+
break;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}, { priority: priorities.low - 1 });
|
|
346
|
+
});
|
|
347
|
+
// Registers a post-fixer that ensures the `headingRows` and `headingColumns` attributes
|
|
348
|
+
// are consistent with the `tableCellType` attribute of the cells. `tableCellType` has priority
|
|
349
|
+
// over `headingRows` and `headingColumns` and we use it to adjust the heading sections of the table.
|
|
350
|
+
model.document.registerPostFixer(writer => {
|
|
351
|
+
// 1. Collect all tables that need to be checked.
|
|
352
|
+
const changes = model.document.differ.getChanges();
|
|
353
|
+
const tablesToCheck = new Set();
|
|
354
|
+
for (const change of changes) {
|
|
355
|
+
// Check if headingRows or headingColumns changed.
|
|
356
|
+
if (change.type === 'attribute' && (change.attributeKey === 'headingRows' || change.attributeKey === 'headingColumns')) {
|
|
357
|
+
const table = change.range.start.nodeAfter;
|
|
358
|
+
if (table?.is('element', 'table') && table.root.rootName !== '$graveyard') {
|
|
359
|
+
tablesToCheck.add(table);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
// Check if tableCellType changed.
|
|
363
|
+
if (change.type === 'attribute' && change.attributeKey === 'tableCellType') {
|
|
364
|
+
const cell = change.range.start.nodeAfter;
|
|
365
|
+
if (cell?.is('element', 'tableCell') && cell.root.rootName !== '$graveyard') {
|
|
366
|
+
const table = cell.findAncestor('table');
|
|
367
|
+
if (table) {
|
|
368
|
+
tablesToCheck.add(table);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
// Check if new headers were inserted.
|
|
373
|
+
if (change.type === 'insert' && change.position.nodeAfter) {
|
|
374
|
+
for (const { item } of model.createRangeOn(change.position.nodeAfter)) {
|
|
375
|
+
if (item.is('element', 'tableCell') &&
|
|
376
|
+
item.getAttribute('tableCellType') &&
|
|
377
|
+
item.root.rootName !== '$graveyard') {
|
|
378
|
+
const table = item.findAncestor('table');
|
|
379
|
+
if (table) {
|
|
380
|
+
tablesToCheck.add(table);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
// 2. Update the attributes of the collected tables.
|
|
387
|
+
return updateTablesHeadingAttributes(tableUtils, writer, tablesToCheck);
|
|
388
|
+
});
|
|
389
|
+
// Refresh the table cells in the editing view when their `tableCellType` attribute changes.
|
|
390
|
+
model.document.on('change:data', () => {
|
|
391
|
+
const { differ } = model.document;
|
|
392
|
+
const cellsToReconvert = new Set();
|
|
393
|
+
for (const change of differ.getChanges()) {
|
|
394
|
+
// If the `tableCellType` attribute changed, the entire cell needs to be re-rendered.
|
|
395
|
+
if (change.type === 'attribute' && change.attributeKey === 'tableCellType') {
|
|
396
|
+
const tableCell = change.range.start.nodeAfter;
|
|
397
|
+
if (tableCell.is('element', 'tableCell')) {
|
|
398
|
+
cellsToReconvert.add(tableCell);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
// Reconvert table cells that had their `tableCellType` attribute changed.
|
|
403
|
+
for (const tableCell of cellsToReconvert) {
|
|
404
|
+
const viewElement = editing.mapper.toViewElement(tableCell);
|
|
405
|
+
const cellType = tableCell.getAttribute('tableCellType');
|
|
406
|
+
const expectedElementName = cellType === 'header' ? 'th' : 'td';
|
|
407
|
+
if (viewElement?.name !== expectedElementName) {
|
|
408
|
+
editing.reconvertItem(tableCell);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
});
|
|
412
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2026, 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
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2026, 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
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2026, 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
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2026, 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
5
|
/**
|
|
@@ -26,7 +26,8 @@ const propertyToCommandMap = {
|
|
|
26
26
|
padding: 'tableCellPadding',
|
|
27
27
|
backgroundColor: 'tableCellBackgroundColor',
|
|
28
28
|
horizontalAlignment: 'tableCellHorizontalAlignment',
|
|
29
|
-
verticalAlignment: 'tableCellVerticalAlignment'
|
|
29
|
+
verticalAlignment: 'tableCellVerticalAlignment',
|
|
30
|
+
cellType: 'tableCellType'
|
|
30
31
|
};
|
|
31
32
|
/**
|
|
32
33
|
* The table cell properties UI plugin. It introduces the `'tableCellProperties'` button
|
|
@@ -125,8 +126,10 @@ export class TableCellPropertiesUIExperimental extends Plugin {
|
|
|
125
126
|
tooltip: true
|
|
126
127
|
});
|
|
127
128
|
this.listenTo(view, 'execute', () => this._showView());
|
|
128
|
-
const commands = Object
|
|
129
|
-
.
|
|
129
|
+
const commands = (Object
|
|
130
|
+
.values(propertyToCommandMap)
|
|
131
|
+
.map(commandName => editor.commands.get(commandName))
|
|
132
|
+
.filter(val => !!val));
|
|
130
133
|
view.bind('isEnabled').toMany(commands, 'isEnabled', (...areEnabled) => (areEnabled.some(isCommandEnabled => isCommandEnabled)));
|
|
131
134
|
return view;
|
|
132
135
|
});
|
|
@@ -155,11 +158,13 @@ export class TableCellPropertiesUIExperimental extends Plugin {
|
|
|
155
158
|
const backgroundColorsConfig = normalizeColorOptions(config.backgroundColors);
|
|
156
159
|
const localizedBackgroundColors = getLocalizedColorOptions(editor.locale, backgroundColorsConfig);
|
|
157
160
|
const hasColorPicker = config.colorPicker !== false;
|
|
161
|
+
const isTableCellTypeSupported = !!editor.config.get('experimentalFlags.tableCellTypeSupport');
|
|
158
162
|
const view = new TableCellPropertiesViewExperimental(editor.locale, {
|
|
159
163
|
borderColors: localizedBorderColors,
|
|
160
164
|
backgroundColors: localizedBackgroundColors,
|
|
161
165
|
defaultTableCellProperties,
|
|
162
|
-
colorPickerConfig: hasColorPicker ? (config.colorPicker || {}) : false
|
|
166
|
+
colorPickerConfig: hasColorPicker ? (config.colorPicker || {}) : false,
|
|
167
|
+
isTableCellTypeSupported
|
|
163
168
|
});
|
|
164
169
|
const t = editor.t;
|
|
165
170
|
// Render the view so its #element is available for the clickOutsideHandler.
|
|
@@ -232,6 +237,11 @@ export class TableCellPropertiesUIExperimental extends Plugin {
|
|
|
232
237
|
}));
|
|
233
238
|
view.on('change:horizontalAlignment', this._getPropertyChangeCallback('tableCellHorizontalAlignment'));
|
|
234
239
|
view.on('change:verticalAlignment', this._getPropertyChangeCallback('tableCellVerticalAlignment'));
|
|
240
|
+
const cellTypeCommand = editor.commands.get('tableCellType');
|
|
241
|
+
if (cellTypeCommand) {
|
|
242
|
+
view.cellTypeDropdown.bind('isEnabled').to(cellTypeCommand, 'isEnabled');
|
|
243
|
+
view.on('change:cellType', this._getPropertyChangeCallback('tableCellType'));
|
|
244
|
+
}
|
|
235
245
|
return view;
|
|
236
246
|
}
|
|
237
247
|
/**
|
|
@@ -245,16 +255,28 @@ export class TableCellPropertiesUIExperimental extends Plugin {
|
|
|
245
255
|
_fillViewFormFromCommandValues() {
|
|
246
256
|
const commands = this.editor.commands;
|
|
247
257
|
const borderStyleCommand = commands.get('tableCellBorderStyle');
|
|
248
|
-
Object
|
|
249
|
-
.
|
|
258
|
+
Object
|
|
259
|
+
.entries(propertyToCommandMap)
|
|
260
|
+
.flatMap(([property, commandName]) => {
|
|
261
|
+
const command = commands.get(commandName);
|
|
262
|
+
if (!command) {
|
|
263
|
+
return [];
|
|
264
|
+
}
|
|
250
265
|
const propertyKey = property;
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
266
|
+
let defaultValue;
|
|
267
|
+
if (propertyKey === 'cellType') {
|
|
268
|
+
defaultValue = '';
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
defaultValue = this.view === this._viewWithContentTableDefaults ?
|
|
272
|
+
this._defaultContentTableCellProperties[propertyKey] || '' :
|
|
273
|
+
this._defaultLayoutTableCellProperties[propertyKey] || '';
|
|
274
|
+
}
|
|
275
|
+
const entry = [
|
|
255
276
|
property,
|
|
256
|
-
|
|
277
|
+
command.value || defaultValue
|
|
257
278
|
];
|
|
279
|
+
return [entry];
|
|
258
280
|
})
|
|
259
281
|
.forEach(([property, value]) => {
|
|
260
282
|
// Do not set the `border-color` and `border-width` fields if `border-style:none`.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2026, 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
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2026, 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
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2026, 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
5
|
/**
|
|
@@ -10,14 +10,15 @@ import { KeystrokeHandler, FocusTracker, type Locale } from 'ckeditor5/src/utils
|
|
|
10
10
|
import { type ColorInputView } from '../../ui/colorinputview.js';
|
|
11
11
|
import type { TableCellPropertiesOptions } from '../../tableconfig.js';
|
|
12
12
|
import '@ckeditor/ckeditor5-ui/theme/components/form/form.css';
|
|
13
|
-
import '../../../theme/formrow.css';
|
|
14
|
-
import '../../../theme/tableform.css';
|
|
15
|
-
import '../../../theme/tablecellproperties.css';
|
|
13
|
+
import '../../../theme/formrow-experimental.css';
|
|
14
|
+
import '../../../theme/tableform-experimental.css';
|
|
15
|
+
import '../../../theme/tablecellproperties-experimental.css';
|
|
16
16
|
export interface TableCellPropertiesViewOptionsExperimental {
|
|
17
17
|
borderColors: Array<NormalizedColorOption>;
|
|
18
18
|
backgroundColors: Array<NormalizedColorOption>;
|
|
19
19
|
defaultTableCellProperties: TableCellPropertiesOptions;
|
|
20
20
|
colorPickerConfig: false | ColorPickerConfig;
|
|
21
|
+
isTableCellTypeSupported: boolean;
|
|
21
22
|
}
|
|
22
23
|
/**
|
|
23
24
|
* The class representing a table cell properties form, allowing users to customize
|
|
@@ -87,6 +88,13 @@ export declare class TableCellPropertiesViewExperimental extends View {
|
|
|
87
88
|
* @default ''
|
|
88
89
|
*/
|
|
89
90
|
verticalAlignment: string;
|
|
91
|
+
/**
|
|
92
|
+
* The type of the table cell ('data' or 'header').
|
|
93
|
+
*
|
|
94
|
+
* @observable
|
|
95
|
+
* @default ''
|
|
96
|
+
*/
|
|
97
|
+
cellType: string;
|
|
90
98
|
/**
|
|
91
99
|
* Options passed to the view. See {@link #constructor} to learn more.
|
|
92
100
|
*/
|
|
@@ -119,6 +127,10 @@ export declare class TableCellPropertiesViewExperimental extends View {
|
|
|
119
127
|
* An input that allows specifying the table cell background color.
|
|
120
128
|
*/
|
|
121
129
|
readonly backgroundInput: LabeledFieldView<ColorInputView>;
|
|
130
|
+
/**
|
|
131
|
+
* A dropdown that allows selecting the type of the table cell (data or header).
|
|
132
|
+
*/
|
|
133
|
+
readonly cellTypeDropdown: LabeledFieldView<FocusableView>;
|
|
122
134
|
/**
|
|
123
135
|
* An input that allows specifying the table cell padding.
|
|
124
136
|
*/
|
|
@@ -167,6 +179,7 @@ export declare class TableCellPropertiesViewExperimental extends View {
|
|
|
167
179
|
* @param options.backgroundColors A configuration of the background color palette used by the
|
|
168
180
|
* {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView#backgroundInput}.
|
|
169
181
|
* @param options.defaultTableCellProperties The default table cell properties.
|
|
182
|
+
* @param options.isTableCellTypeSupported A flag indicating whether the table cell type is supported.
|
|
170
183
|
*/
|
|
171
184
|
constructor(locale: Locale, options: TableCellPropertiesViewOptionsExperimental);
|
|
172
185
|
/**
|
|
@@ -195,6 +208,14 @@ export declare class TableCellPropertiesViewExperimental extends View {
|
|
|
195
208
|
* * {@link #backgroundInput}.
|
|
196
209
|
*/
|
|
197
210
|
private _createBackgroundFields;
|
|
211
|
+
/**
|
|
212
|
+
* Create cell type field.
|
|
213
|
+
*
|
|
214
|
+
* * {@link #cellTypeDropdown}.
|
|
215
|
+
*
|
|
216
|
+
* @internal
|
|
217
|
+
*/
|
|
218
|
+
private _createCellTypeField;
|
|
198
219
|
/**
|
|
199
220
|
* Creates the following form fields:
|
|
200
221
|
*
|
|
@@ -226,6 +247,10 @@ export declare class TableCellPropertiesViewExperimental extends View {
|
|
|
226
247
|
* Creates a back button view that cancels the form.
|
|
227
248
|
*/
|
|
228
249
|
private _createBackButton;
|
|
250
|
+
/**
|
|
251
|
+
* Creates the cell type dropdown definitions.
|
|
252
|
+
*/
|
|
253
|
+
private _getCellTypeDefinitions;
|
|
229
254
|
/**
|
|
230
255
|
* Provides localized labels for {@link #horizontalAlignmentToolbar} buttons.
|
|
231
256
|
*/
|
|
@@ -234,4 +259,8 @@ export declare class TableCellPropertiesViewExperimental extends View {
|
|
|
234
259
|
* Provides localized labels for {@link #verticalAlignmentToolbar} buttons.
|
|
235
260
|
*/
|
|
236
261
|
private get _verticalAlignmentLabels();
|
|
262
|
+
/**
|
|
263
|
+
* Provides localized labels for {@link #cellTypeDropdown}.
|
|
264
|
+
*/
|
|
265
|
+
private get _cellTypeLabels();
|
|
237
266
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2026, 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
5
|
/**
|
|
6
6
|
* @module table/tablecellproperties/ui/tablecellpropertiesviewexperimental
|
|
7
7
|
*/
|
|
8
8
|
/* istanbul ignore file -- @preserve */
|
|
9
|
-
import { addListToDropdown, ButtonView, createLabeledDropdown, createLabeledInputText, FocusCycler, FormRowView, FormHeaderView, LabeledFieldView, LabelView, submitHandler, ToolbarView, View, ViewCollection } from 'ckeditor5/src/ui.js';
|
|
10
|
-
import { KeystrokeHandler, FocusTracker } from 'ckeditor5/src/utils.js';
|
|
9
|
+
import { addListToDropdown, ButtonView, createLabeledDropdown, createLabeledInputText, FocusCycler, FormRowView, FormHeaderView, LabeledFieldView, LabelView, submitHandler, ToolbarView, UIModel, View, ViewCollection } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import { Collection, KeystrokeHandler, FocusTracker } from 'ckeditor5/src/utils.js';
|
|
11
11
|
import { IconAlignBottom, IconAlignCenter, IconAlignJustify, IconAlignLeft, IconAlignMiddle, IconAlignRight, IconAlignTop, IconPreviousArrow } from 'ckeditor5/src/icons.js';
|
|
12
12
|
import { fillToolbar, getBorderStyleDefinitions, getBorderStyleLabels, getLabeledColorInputCreator } from '../../utils/ui/table-propertiesexperimental.js';
|
|
13
13
|
// eslint-disable-next-line ckeditor5-rules/ckeditor-imports
|
|
14
14
|
import '@ckeditor/ckeditor5-ui/theme/components/form/form.css';
|
|
15
|
-
import '../../../theme/formrow.css';
|
|
16
|
-
import '../../../theme/tableform.css';
|
|
17
|
-
import '../../../theme/tablecellproperties.css';
|
|
15
|
+
import '../../../theme/formrow-experimental.css';
|
|
16
|
+
import '../../../theme/tableform-experimental.css';
|
|
17
|
+
import '../../../theme/tablecellproperties-experimental.css';
|
|
18
18
|
/**
|
|
19
19
|
* The class representing a table cell properties form, allowing users to customize
|
|
20
20
|
* certain style aspects of a table cell, for instance, border, padding, text alignment, etc..
|
|
@@ -52,6 +52,10 @@ export class TableCellPropertiesViewExperimental extends View {
|
|
|
52
52
|
* An input that allows specifying the table cell background color.
|
|
53
53
|
*/
|
|
54
54
|
backgroundInput;
|
|
55
|
+
/**
|
|
56
|
+
* A dropdown that allows selecting the type of the table cell (data or header).
|
|
57
|
+
*/
|
|
58
|
+
cellTypeDropdown;
|
|
55
59
|
/**
|
|
56
60
|
* An input that allows specifying the table cell padding.
|
|
57
61
|
*/
|
|
@@ -100,6 +104,7 @@ export class TableCellPropertiesViewExperimental extends View {
|
|
|
100
104
|
* @param options.backgroundColors A configuration of the background color palette used by the
|
|
101
105
|
* {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView#backgroundInput}.
|
|
102
106
|
* @param options.defaultTableCellProperties The default table cell properties.
|
|
107
|
+
* @param options.isTableCellTypeSupported A flag indicating whether the table cell type is supported.
|
|
103
108
|
*/
|
|
104
109
|
constructor(locale, options) {
|
|
105
110
|
super(locale);
|
|
@@ -112,11 +117,13 @@ export class TableCellPropertiesViewExperimental extends View {
|
|
|
112
117
|
width: '',
|
|
113
118
|
height: '',
|
|
114
119
|
horizontalAlignment: '',
|
|
115
|
-
verticalAlignment: ''
|
|
120
|
+
verticalAlignment: '',
|
|
121
|
+
cellType: ''
|
|
116
122
|
});
|
|
117
123
|
this.options = options;
|
|
118
124
|
const { borderStyleDropdown, borderWidthInput, borderColorInput, borderRowLabel } = this._createBorderFields();
|
|
119
125
|
const { backgroundRowLabel, backgroundInput } = this._createBackgroundFields();
|
|
126
|
+
const { cellTypeRowLabel, cellTypeDropdown } = this._createCellTypeField();
|
|
120
127
|
const { widthInput, operatorLabel, heightInput, dimensionsLabel } = this._createDimensionFields();
|
|
121
128
|
const { horizontalAlignmentToolbar, verticalAlignmentToolbar, alignmentLabel } = this._createAlignmentFields();
|
|
122
129
|
this.focusTracker = new FocusTracker();
|
|
@@ -126,6 +133,7 @@ export class TableCellPropertiesViewExperimental extends View {
|
|
|
126
133
|
this.borderWidthInput = borderWidthInput;
|
|
127
134
|
this.borderColorInput = borderColorInput;
|
|
128
135
|
this.backgroundInput = backgroundInput;
|
|
136
|
+
this.cellTypeDropdown = cellTypeDropdown;
|
|
129
137
|
this.paddingInput = this._createPaddingField();
|
|
130
138
|
this.widthInput = widthInput;
|
|
131
139
|
this.heightInput = heightInput;
|
|
@@ -159,22 +167,48 @@ export class TableCellPropertiesViewExperimental extends View {
|
|
|
159
167
|
// Border row.
|
|
160
168
|
this.children.add(new FormRowView(locale, {
|
|
161
169
|
labelView: borderRowLabel,
|
|
162
|
-
children: [
|
|
170
|
+
children: this.options.isTableCellTypeSupported ? [
|
|
171
|
+
borderRowLabel,
|
|
172
|
+
borderStyleDropdown,
|
|
173
|
+
borderWidthInput,
|
|
174
|
+
borderColorInput
|
|
175
|
+
] : [
|
|
163
176
|
borderRowLabel,
|
|
164
177
|
borderStyleDropdown,
|
|
165
178
|
borderColorInput,
|
|
166
179
|
borderWidthInput
|
|
167
180
|
],
|
|
168
|
-
class:
|
|
181
|
+
class: `ck-table-form__border-row${this.options.isTableCellTypeSupported ? ' ck-table-form__border-row_experimental' : ''}`
|
|
169
182
|
}));
|
|
170
|
-
// Background.
|
|
183
|
+
// Background and cell type.
|
|
171
184
|
this.children.add(new FormRowView(locale, {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
185
|
+
children: this.options.isTableCellTypeSupported ? [
|
|
186
|
+
new FormRowView(locale, {
|
|
187
|
+
labelView: cellTypeRowLabel,
|
|
188
|
+
children: [
|
|
189
|
+
cellTypeRowLabel,
|
|
190
|
+
cellTypeDropdown
|
|
191
|
+
],
|
|
192
|
+
class: 'ck-table-form__cell-type-row'
|
|
193
|
+
}),
|
|
194
|
+
new FormRowView(locale, {
|
|
195
|
+
labelView: backgroundRowLabel,
|
|
196
|
+
children: [
|
|
197
|
+
backgroundRowLabel,
|
|
198
|
+
backgroundInput
|
|
199
|
+
],
|
|
200
|
+
class: 'ck-table-form__background-row'
|
|
201
|
+
})
|
|
202
|
+
] : [
|
|
203
|
+
new FormRowView(locale, {
|
|
204
|
+
labelView: backgroundRowLabel,
|
|
205
|
+
children: [
|
|
206
|
+
backgroundRowLabel,
|
|
207
|
+
backgroundInput
|
|
208
|
+
],
|
|
209
|
+
class: 'ck-table-form__background-row'
|
|
210
|
+
})
|
|
211
|
+
]
|
|
178
212
|
}));
|
|
179
213
|
// Dimensions row and padding.
|
|
180
214
|
this.children.add(new FormRowView(locale, {
|
|
@@ -224,7 +258,9 @@ export class TableCellPropertiesViewExperimental extends View {
|
|
|
224
258
|
'ck',
|
|
225
259
|
'ck-form',
|
|
226
260
|
'ck-table-form',
|
|
227
|
-
'ck-table-cell-properties-form'
|
|
261
|
+
'ck-table-cell-properties-form',
|
|
262
|
+
'ck-table-cell-properties-form_experimental',
|
|
263
|
+
this.options.isTableCellTypeSupported ? 'ck-table-cell-properties-form_experimental-no-cell-type' : ''
|
|
228
264
|
],
|
|
229
265
|
// https://github.com/ckeditor/ckeditor5-link/issues/90
|
|
230
266
|
tabindex: '-1'
|
|
@@ -250,6 +286,7 @@ export class TableCellPropertiesViewExperimental extends View {
|
|
|
250
286
|
this.borderStyleDropdown,
|
|
251
287
|
this.borderColorInput,
|
|
252
288
|
this.borderWidthInput,
|
|
289
|
+
this.cellTypeDropdown,
|
|
253
290
|
this.backgroundInput,
|
|
254
291
|
this.widthInput,
|
|
255
292
|
this.heightInput,
|
|
@@ -408,6 +445,47 @@ export class TableCellPropertiesViewExperimental extends View {
|
|
|
408
445
|
backgroundInput
|
|
409
446
|
};
|
|
410
447
|
}
|
|
448
|
+
/**
|
|
449
|
+
* Create cell type field.
|
|
450
|
+
*
|
|
451
|
+
* * {@link #cellTypeDropdown}.
|
|
452
|
+
*
|
|
453
|
+
* @internal
|
|
454
|
+
*/
|
|
455
|
+
_createCellTypeField() {
|
|
456
|
+
const locale = this.locale;
|
|
457
|
+
const t = this.t;
|
|
458
|
+
const cellTypeRowLabel = new LabelView(locale);
|
|
459
|
+
cellTypeRowLabel.text = t('Cell type');
|
|
460
|
+
const cellTypeLabels = this._cellTypeLabels;
|
|
461
|
+
const cellTypeDropdown = new LabeledFieldView(locale, createLabeledDropdown);
|
|
462
|
+
cellTypeDropdown.set({
|
|
463
|
+
label: t('Cell type'),
|
|
464
|
+
class: 'ck-table-cell-properties-form__cell-type'
|
|
465
|
+
});
|
|
466
|
+
cellTypeDropdown.fieldView.buttonView.set({
|
|
467
|
+
ariaLabel: t('Cell type'),
|
|
468
|
+
ariaLabelledBy: undefined,
|
|
469
|
+
isOn: false,
|
|
470
|
+
withText: true,
|
|
471
|
+
tooltip: t('Cell type')
|
|
472
|
+
});
|
|
473
|
+
cellTypeDropdown.fieldView.buttonView.bind('label').to(this, 'cellType', value => {
|
|
474
|
+
return cellTypeLabels[value || 'data'];
|
|
475
|
+
});
|
|
476
|
+
cellTypeDropdown.fieldView.on('execute', evt => {
|
|
477
|
+
this.cellType = evt.source._cellTypeValue;
|
|
478
|
+
});
|
|
479
|
+
cellTypeDropdown.bind('isEmpty').to(this, 'cellType', value => !value);
|
|
480
|
+
addListToDropdown(cellTypeDropdown.fieldView, this._getCellTypeDefinitions(), {
|
|
481
|
+
role: 'menu',
|
|
482
|
+
ariaLabel: t('Cell type')
|
|
483
|
+
});
|
|
484
|
+
return {
|
|
485
|
+
cellTypeRowLabel,
|
|
486
|
+
cellTypeDropdown
|
|
487
|
+
};
|
|
488
|
+
}
|
|
411
489
|
/**
|
|
412
490
|
* Creates the following form fields:
|
|
413
491
|
*
|
|
@@ -505,7 +583,8 @@ export class TableCellPropertiesViewExperimental extends View {
|
|
|
505
583
|
horizontalAlignmentToolbar.set({
|
|
506
584
|
isCompact: true,
|
|
507
585
|
role: 'radiogroup',
|
|
508
|
-
ariaLabel: t('Horizontal text alignment toolbar')
|
|
586
|
+
ariaLabel: t('Horizontal text alignment toolbar'),
|
|
587
|
+
class: 'ck-table-cell-properties-form__horizontal-alignment-toolbar'
|
|
509
588
|
});
|
|
510
589
|
fillToolbar({
|
|
511
590
|
view: this,
|
|
@@ -532,7 +611,8 @@ export class TableCellPropertiesViewExperimental extends View {
|
|
|
532
611
|
verticalAlignmentToolbar.set({
|
|
533
612
|
isCompact: true,
|
|
534
613
|
role: 'radiogroup',
|
|
535
|
-
ariaLabel: t('Vertical text alignment toolbar')
|
|
614
|
+
ariaLabel: t('Vertical text alignment toolbar'),
|
|
615
|
+
class: 'ck-table-cell-properties-form__vertical-alignment-toolbar'
|
|
536
616
|
});
|
|
537
617
|
fillToolbar({
|
|
538
618
|
view: this,
|
|
@@ -598,6 +678,27 @@ export class TableCellPropertiesViewExperimental extends View {
|
|
|
598
678
|
backButton.delegate('execute').to(this, 'cancel');
|
|
599
679
|
return backButton;
|
|
600
680
|
}
|
|
681
|
+
/**
|
|
682
|
+
* Creates the cell type dropdown definitions.
|
|
683
|
+
*/
|
|
684
|
+
_getCellTypeDefinitions() {
|
|
685
|
+
const itemDefinitions = new Collection();
|
|
686
|
+
const cellTypeLabels = this._cellTypeLabels;
|
|
687
|
+
for (const type of ['data', 'header']) {
|
|
688
|
+
const definition = {
|
|
689
|
+
type: 'button',
|
|
690
|
+
model: new UIModel({
|
|
691
|
+
_cellTypeValue: type,
|
|
692
|
+
label: cellTypeLabels[type],
|
|
693
|
+
role: 'menuitemradio',
|
|
694
|
+
withText: true
|
|
695
|
+
})
|
|
696
|
+
};
|
|
697
|
+
definition.model.bind('isOn').to(this, 'cellType', value => value === type);
|
|
698
|
+
itemDefinitions.add(definition);
|
|
699
|
+
}
|
|
700
|
+
return itemDefinitions;
|
|
701
|
+
}
|
|
601
702
|
/**
|
|
602
703
|
* Provides localized labels for {@link #horizontalAlignmentToolbar} buttons.
|
|
603
704
|
*/
|
|
@@ -627,6 +728,16 @@ export class TableCellPropertiesViewExperimental extends View {
|
|
|
627
728
|
bottom: t('Align cell text to the bottom')
|
|
628
729
|
};
|
|
629
730
|
}
|
|
731
|
+
/**
|
|
732
|
+
* Provides localized labels for {@link #cellTypeDropdown}.
|
|
733
|
+
*/
|
|
734
|
+
get _cellTypeLabels() {
|
|
735
|
+
const t = this.t;
|
|
736
|
+
return {
|
|
737
|
+
data: t('Data cell'),
|
|
738
|
+
header: t('Header cell')
|
|
739
|
+
};
|
|
740
|
+
}
|
|
630
741
|
}
|
|
631
742
|
function isBorderStyleSet(value) {
|
|
632
743
|
return value !== 'none';
|