Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

Tips for opening links in a new tab using custom annotation in Sanity.io

4 replies
Last updated: Apr 14, 2020
any hints on supporting opening links in a new tab (via block content)?
Apr 14, 2020, 2:00 AM
user M
😅
Apr 14, 2020, 2:03 AM
I’ve been doing it using a custom annotation like this, and then in the frontend project I can get the data from
markDefs
and check if
blank
is true or false to add the appropriate
target="_blank"
Apr 14, 2020, 2:14 AM
Apr 14, 2020, 4:07 AM
user R
user Q
thx! 🙇‍♂️
Apr 14, 2020, 6:41 AM

Sanity– build remarkable experiences at scale

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

Was this answer helpful?