sanity icon indicating copy to clipboard operation
sanity copied to clipboard

Links in the "block" show blank area when trying to edit it again

Open wuzinong opened this issue 3 years ago • 1 comments

If you find a security vulnerability, do NOT open an issue. Email [email protected] instead.

Describe the bug

Link in the rich text box is not working well. The first time when opening the edit link in rich text box it works well, but when we eidt it again it shows a blank block

1

To Reproduce

This is the schema we're using:

`export default { name: 'testTerms', title: 'Test terms', type: 'document', icon: GoFile,

fields: [ { name: 'internalName', title: 'Internal name', description: 'Not displayed to users.', type: 'string', },

{
  name: 'text',
  title: 'Terms text',
  description: 'This is a test description.',
  type: 'array',
  of: [
    {
      type: 'block',
      styles: [
        {title: 'Normal', value: 'normal'},
        {title: 'H2', value: 'h2'},
        {title: 'H3', value: 'h3'},
        {title: 'H4', value: 'h4'},
        {title: 'H5', value: 'h5'},
        {title: 'H6', value: 'h6'},
      ],
      marks: {
        annotations: [
          {
            title: 'URL',
            name: 'link',
            type: 'object',
            fields: [
              {
                title: 'URL',
                name: 'href',
                type: 'url',
              },
              {
                title: 'Open in the same tab',
                name: 'sametab',
                type: 'boolean',
              },
            ],
          },
        ],
      },
    },
    {
      type: 'table',
      preview: {},
    },
  ],
},

],

preview: { select: { title: 'internalName', media: 'icon', }, }, } as Document`

wuzinong avatar Aug 31 '22 07:08 wuzinong

Thanks for reporting! This was a bug in an earlier version of our UI library - could you try removing node_modules and yarn.lock/package-lock.json and reinstalling dependencies with npm install/yarn?

rexxars avatar Sep 08 '22 20:09 rexxars

Hi!

We are currently working on improving our workflows and follow-up on our open GitHub repository. In that work, we have decided to close most issues older than the release of Sanity Studio v3.

We value your feedback, so if this issue is still important to you and relevant for Sanity Studio v3, please search for relevant open issues. If you can’t find any, open a new one and link to relevant comments in this thread. For questions about how to do something, please post them in the [slack

kmelve avatar Jan 11 '23 19:01 kmelve