1

我正在努力让使用 sanity.studio 中的富文本编辑器(没有编码知识)的人能够在他们上传的图像中添加外部链接。因此,可以在他们添加的帖子中点击它并将用户带到另一个页面。现在他们只能添加一些 ALT 文本和编辑图片。这是关于 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,
          },
        }
      ],
    }
4

0 回答 0