Data Field Type

I have read the examples of creating tables in Prismic. Add Table Slice. Our site content contains a lot of data tables, which makes that process extremely painful. Is it possible to have a "data" field type where someone could add csv, or json?

Hi @dion. Yeah, there are a couple of ways that you could do this. First of all, for you or anyone else who finds this thread, here is a post that discusses a number of ways to handle tables in Prismic.

That said, there are a couple of ways to do what you're asking. The first and easiest is to upload csv or json files to the Media library. You can use a Link field to link to these, and then your website application can use them however you need.

If you want to modify the data in the Prismic UI, then you'll need to set up a field that can handle this. I usually use a rich text field and configure it to only allow the 'preformatted' option as well as selecting 'Allow multiple paragraphs'. You can then input your csv, json, or markdown content. Your website application can then take that, convert it from raw text into the form you need, and use it however you need.