We're trying to add custom labels to text, and the label shows up in the page builder, but it does not seem to apply to the text when selected.
We've done this with the legacy builder without issues.
Impacted feature
Page builder custom labels
Steps to reproduce
Add custom label to rich text field and try to apply it in the page builder.
We're also experiencing this bug. Here's the link to the exact place in the repo we're unable to mark some of the title as a pre-defined label we created: Prismic
I don't use labels in all my projects, so I just went to one that does so I can test it in the page builder. All seems to be working for me. Are you seeing any errors in your javascript console? Did you use that plugin they recommend to record it happening?
I just tested it, and it is working fine on my end. So there are two likely issues, either:
The config isn't quite correct and the label isn't in the labels field:
"text": {
"type": "StructuredText",
"config": {
"label": "Text",
"labels": ["superscript"], // like this
"multi": "paragraph,strong,em"
}
}
A browser plugin is blocking the pop up.
If you update the JSON and turn off the browser plugins and you’re still seeing the problem can you record it with this Chrome plugin, it will give us the dev information needed to debug and you can remove it once you’re done.
We looked into this on our end, and the config seems fine (see attached screenshot) and copying the code below as well:
"title": { "type": "StructuredText", "config": { "label": "Title", "placeholder": "", "allowTargetBlank": false, "single": "heading2", "labels": ["highlightBlue", "breakLine"] } },
That's very odd. This has been marked as resolved, but it appears (based on your video) that it is not resolved. Also, it's odd that you can see a label applied on the English title, but at no point do you appear to be able to add new labels. Is that accurate?
I think the issue might be the restriction on the formatting of your Rich Text field. When you use "single": "heading2", you’re restricting the field to only allow a single block type (e.g. <h2>), and that disables support for inline formatting or labels.
When using single, you cannot define inline labels or formatting options like bold, italic, or labels.