https://discord.gg/botpress logo
Question about line breaks in text and raw input c...
# 🤝help
s
Hi everyone, I’m working on embedding my Botpress bot into a WordPress site using the embedded layout. I have one issue with line breaks: In the text cards and raw input cards, I manually add line breaks (by pressing Enter) when editing the flow in Botpress Studio. It looks perfect in the Studio preview. 👉 But when I embed the bot on my website, the bot sends the messages as a single block of text, ignoring most of the line breaks. What’s strange is that sometimes line breaks are preserved, and other times they’re completely ignored — even though I write them the same way. I’ve tried using \n, , and actual newlines in the editor, but the behavior remains inconsistent. Has anyone experienced this before? Is there a known fix, or a workaround to ensure line breaks display properly on the website for both text and raw input cards? Thanks a lot in advance for your help! 🙏
p
I haven't encountered a similar issues. Do you have any policy/personality/translator agents on that bot?
s
I was asked whether my bot uses a Policy, Personality, or Translator Agent — it doesn’t. To isolate the issue, I created a minimal test bot that only uses a Text card (no agents, no flows, no conditions). 🔍 What I found might be a rendering bug: 1. When I embed the bot using the iframe method (like in my test_copy2.html), the line breaks and formatting of the Text card are not respected (everything is shown as one big block). See the attached screenshot. 2. However, when I integrate the bot as a chat bubble using: then the text renders correctly with all line breaks preserved. Maybe I've done error in my code but I tried to fit with the doc : https://botpress.com/docs/webchat/get-started/embedding-webchat#embed-webchat
p
You should use This is the most recent version.