You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi everyone,
I’m encountering an issue where text content does not automatically wrap, causing it to overflow beyond the container’s boundaries.
I am new here, just use the admin panel create a page, like this:
What I observed:
• As seen in the screenshot below, long text strings overflow the container.
• The text does not wrap to the next line and instead continues horizontally.
• This happens both in the hero section and lower content blocks.
What I expected:
• The text should wrap within its container and respect the set width constraints.
What did I try:
I modified src/blocks/Content/Component.tsx and added className="break-words" to the content block. After this change, the text wraps properly within the container. But I guess it was not designed that way, right??
I see... there seems some confusion here. :) Payload is only the admin. You seem to have used the webpage template. This is only for Demo purposes or for an starting point to build your own template. Payload itself is nothing more than the admin panel. Everything else is more or less up to the dev who wants to make an page with it. So your issue seems to be non breaking Text. As you dont have any Text tokens in your "blablabla..." Text the Browser does not know when the word ends or begins. So it does not know when to break the Text. As i am sure there is no word this long without an space or hyphen you will not have this problem with real Text. Try an Loren Issum Text for example and you will see everything is fine. This is normal Browser behavior and has nothibg to do with payload. :)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi everyone,
I’m encountering an issue where text content does not automatically wrap, causing it to overflow beyond the container’s boundaries.
I am new here, just use the admin panel create a page, like this:
What I observed:
• As seen in the screenshot below, long text strings overflow the container.
• The text does not wrap to the next line and instead continues horizontally.
• This happens both in the hero section and lower content blocks.
What I expected:
• The text should wrap within its container and respect the set width constraints.
What did I try:
I modified src/blocks/Content/Component.tsx and added className="break-words" to the content block. After this change, the text wraps properly within the container. But I guess it was not designed that way, right??
Environment:
• Browser: Chrome
• Version: Lastest Payload
Beta Was this translation helpful? Give feedback.
All reactions