Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
319 views
in Technique[技术] by (71.8m points)

javascript - Adding an external URL when clicking an image with the rich text editor of Sanity

I'm trying to make possible for the people using the rich text editor in sanity.studio (with no coding knowledge) to add an external link in the image they are uploading. So, then it is clickable in the post they are adding and take the user to another page. Right now they are only able to add some ALT text and edit the picture. This is the code about the images in the blockContent.js:

{
      type: 'image',
      fields: [
        {
          type: 'text',
          name: 'alt',
          title: 'Alternative text',
          description: `Some of your visitors cannot see images, 
            be they blind, color-blind, low-sighted; 
            alternative text is of great help for those 
            people that can rely on it to have a good idea of 
            what's on your page.`,
          options: {
            isHighlighted: true,
            hotspot: true,
          },
        }
      ],
    }
question from:https://stackoverflow.com/questions/65832927/adding-an-external-url-when-clicking-an-image-with-the-rich-text-editor-of-sanit

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...