sanity-plugin-table icon indicating copy to clipboard operation
sanity-plugin-table copied to clipboard

Formatting cells

Open Addibro opened this issue 3 years ago • 6 comments

Hello!

Is there a way to provide any formatting to the cells? Like adding alignment, different types than strings etc.

Thanks!

Addibro avatar Jun 16 '21 12:06 Addibro

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?

rdunk avatar Jun 30 '21 15:06 rdunk

Absolutely, that would make the table truly generic. If you have the time and will, that would be an awesome addition to this plugin :)

Addibro avatar Aug 10 '21 11:08 Addibro

Would also be nice to have colspan and rowspan options as well

mitchuman avatar Aug 10 '21 20:08 mitchuman

I'd like to preset columns (3) with headings and the author just adds rows... is that possible?

Schemata avatar Feb 25 '22 04:02 Schemata

Multiline, list and hyperlinks would be a nice upgrade.

andrem0 avatar Sep 14 '22 08:09 andrem0

@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

davydog187 avatar Feb 05 '23 18:02 davydog187