Page builder custom labels not working

Describe your question/issue in detail

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.

Hi @tyler.drake thanks for reporting the issue. The team will take a look and I'll post an update here once it's been fixed.

Hi @drayke , I've been unable to replicate the bug. Could you please share with me the name of the repo and custom-type where this is happening?

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?

Hi @withloveinternet ,

I just tested it, and it is working fine on my end. So there are two likely issues, either:

  1. 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"
          }
        }
  1. 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.

1 Like

Hi Phil,

Thanks! We're checking, and we'll get back to you with a screen recording if we still have issues.

Best,
Ariel

1 Like

Hi Phil,

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"] } },

Thanks for looking into this!

Best,
Ariel

(attachments)

Hi Phil,

Here is a screen recording where I disabled all extensions apart from the Jam recorder and I tried marking some text to label. it still doesn't work:
https://jam.dev/c/d31681b4-a27f-44b5-9f40-51f0d2ba145a

Best,
Ariel

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?

1 Like

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.

Can you try removing that to see if it helps?

1 Like

That worked! Thanks so much.

Best,
Ariel

1 Like