See Sanity in action 👀 Join us for a live product demo + Q&A →

Using JavaScript in list previews to call substring() on text fields

1 replies
Last updated: Feb 21, 2023
For list previews: .. can you use any javascript in the preview function? cannot seem to call substring() on what should be a text field
Feb 21, 2023, 7:24 PM
Yes, you can use any valid JS.
Feb 21, 2023, 9:15 PM – build remarkable experiences at scale

Sanity is a customizable solution that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Categorized in