Slice richText Field disappeared

Continuing the discussion from Slice Labels have completely disappeared:
I've had the same issues involving labels on rich text fields in my slices.

I can see from this post
(BUG - Slice Labels are being deleted):
"Issue:
The Slice Labels only disappear when a Custom Type is edited using the visual editor, this is because the Slice Labels can only be edited with the JSON editor."

Is there any way that labels could be added to the visual editor for a rich text field?

1 Like

Hello @levivanveen2

Welcome to the Prismic community and thanks for reaching out to us.

We have already discussed this in the following thread:

Thanks,
Priyanka

@Priyanka Thank you for your response. I did see that thread but it's discussing slice machine, which is why I linked to this thread instead

Hello @levivanveen2

Custom labels are an advanced configuration that can only be set up in the JSON editor. Learn more about it here.

Can you share a screen recording of the issue are you getting?

Thanks,
Priyanka

I have sent you a screen recording of the issue. After adding a custom richtext label in the JSON editor, if I make any changes to the slice, the labels disappear, and must be re-added to the JSON editor. In the thread I linked earlier, a suggested solution was:

"The most reliable otpion is to use a Select Field as the first field in your Slice instead of Slice Labels. Your user can select what option they want using this field and the Select Field will never disappear as it is built using the Visual Builder."

This is why I requested for custom labels to be added to richtext fields in the visual builder, as that response makes it seem that stuff in the visual builder won't disappear. Using a select field is not a viable option for me, because I may need access to multiple labels in the same richtext field.

I didn't include it in the recording, but I am able to access and use the custom labels I create in the JSON editor, as long as they haven't been erased by editing the slice.

Hello @levivanveen2

This is expected behavior for the moment whenever you update the Rich Text field, Custom labels disappear, and you need to re-add in the JSON editor. I agreed with your feedback that Custom labels should be available in the Visual editor so they won't disappear. Our team is redoing the editor and some fields. I will pass this to the team to include this feature.

Thanks,
Priyanka