sanity-plugin-table
sanity-plugin-table copied to clipboard
Formatting cells
Hello!
Is there a way to provide any formatting to the cells? Like adding alignment, different types than strings etc.
Thanks!
Hi @Addibro. Not currently, as rows are essentially an array of strings. I did originally want to keep this a straightforward data type, I've never personally encountered a need for objects but I see that it would probably be useful for a lot of people.
I'm wondering if it would be preferable to expand the configuration to allow people to define their own cell data schema. I'd need to have a bit of a think about how the input component would handle that, but does that sound of interest?
Absolutely, that would make the table truly generic. If you have the time and will, that would be an awesome addition to this plugin :)
Would also be nice to have colspan
and rowspan
options as well
I'd like to preset columns (3) with headings and the author just adds rows... is that possible?
Multiline, list and hyperlinks would be a nice upgrade.
@Addibro @mitchuman @Schemata @andrem0 I just released Sanity Portable Table that adds support for Portable Text cells. Please open an issue for feedback / questions. PRs welcome