I am using Sitecore 9.3 with JSS.

I have created few components that have buttons. The button labels are editable in sitecore.

The issue is when I edit those button labels inline, e.g, I need to add text - 'Sign In' as button label, then after 'Sign' when I enter space and write 'In', it does not show up. When I check via Inspect Element, it shows that it has added '&nbsp' tags.

This is only happening with text inside 'button' tags and only with inline editing in Experience Editor.

Screenshot -

enter image description here Code - /src/components/componentName/index.js

<Button variant="primary" type="submit">
<Text field={props.fields.buttonlabel} />

Can anybody please suggest a resolution for this?

  • I think you have to handle this via CSS and when you hit enter it's ignoring the text because of single line of text react-jss-typescript-starter-develop.azurewebsites.net/…. If you will check the sample app > style guide then you will get information about multiline text field
    – Amit Kumar
    May 10, 2020 at 9:16
  • @AmitKumar can you plese elaborate more?
    – NewbieHere
    May 11, 2020 at 4:04


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.