yet I can’t even save the line break version of the text on CMS item field. I made sure to select multine input, and I can type with line breaks but just as I hit save, it auto deletes line breaks.
I can edit the text on designer mode but again not allowing any linebreaks.
Published page link and readonly designer link? You’ll need to share the details of where you’re having problems in order to help you.
In general;
shift+enter is how you create a line break in most editors.
browsers do not display whitespace or line breaks in standard HTML elements with default CSS settings- you need to use CSS preformatting options to preserve whitespace and line breaks.
different browsers might handle this differently, in subtle but important ways
When you want line breaks in HTML, you’re far better off using HTML line breaks which are the <br> element. This means using a richtext field in the CMS rather than a plaintext one.
If there’s a reason that’s not suitable, you can use CSS preformatting on your rendered block to force line breaks and whitespace to appear.
But the problem starts way before published page or designer in webflow.
In CMS editing fields, I can use shift enter and normal enter but as soon as I hit Save/Draft/Publish it automatically deletes all line breaks and makes it one liner text. Is this a bug on my side, or can you write and export multiple paraghrap text fields without using richfields?
Hey, yeah, you are right. I have the same problem, and it’s not from the browser because I tried multiple browsers, and the issue still happens in the CMS multi-text field before it even appears on the website. So, clearly, the problem is on Webflow’s side and not the browser.
I also tried both Enter and Shift + Enter, but the same problem occurs. It doesn’t create a line break. Strangely, it works on some lines but not on others.
So if someone from Webflow can take a look at this and fix this bug quickly, that would be really helpful.
Alex if you can reproduce it, you should file a ticket with Support.
This is the community forum so the engineers generally won’t know about your posts here.
Hi @Cori , the current best practice is that if you want line breaks or paragraph breaks, use a rich text field. For line breaks alone there (<br>) you can use SHIFT+ENTER. Otherwise use use paragraphs and CSS style the rich text element for the line spacing you prefer.
In my experience the plaintext multiline field does often preserve LF’s but (1) it doesn’t display them on reload, which makes the design UX unworkable and (2) LF’s aren’t particularly HTML friendly anyway- you’d have to pre-format the response in order for the browser to show them in your published HTML.
Thanks for replying. I haven’t been able to get SHIFT+ENTER to work—the line break simply disappears on save.
I saw the recommendation above to use Rich Text fields for text that require line breaks, but the RT field is overly flexible for the usage I need (and ideally I’d like to avoid rebuilding several templates and re-organizing the data entries). I’m specifically thinking about headings, subheadings, and other text snippets that should not accept images, bullet points, etc. I’m setting up the CMS so that other team members can input data, not just for myself, so it’s important that the field types are constrained enough not to break the page template by accident, while also supporting the content writers.
Anyhow, if anyone has any other ideas let me know!
Hey @Cori I just ran into this problem, and wanted to post what worked for me, hope it works for you.
Copy the text with line breaks and paste it in the multi-line text field. Make sure it’s showing line breaks in the field. Then instead of clicking out of the field which removes the line breaks, just immediately hit “Publish now” button while the field is still active. The field should still remove the line breaks, but if you go to the live page you should see that they are still there.