How to make a Line break CMS

Do I have to use Richtext in the CMS to make a line break? I would like to decide where certain Line Breaks are.

1 Like

Use cntrl+enter for a new line (break). Works everywhere (Not only in CMS richtexts).

or "shift+enter" (Also the shortcut in microsoft word)

paragraphs-and-line-breaks

<br>

2 Likes

doesn’t work for me… everytime i do a break, the text jumps back to normal

3 Likes

With WF’s plain text field, the save in the CMS Item editor (designer) strips all blank lines when saving the collection item. If you added HTML WF would encode it.

The only possible way around this would be to add a HTML Line Break element or something you could target for replacement. If I used <br> for example, which Webflow will encode on publish, then you run a script that decodes the encoded value so the browser would render it.

2 Likes

@webdev Could you please explain more on the decoding process? I’m not quite sure how I’d go about that. Thanks

1 Like

@boafo- The process would be the same as what I have written about (along with a code solution) on my blog. See =>
Render Custom Code from Webflow CMS Item’s Value - WF How

1 Like

@webdev Thanks for the response I will check this out!

Are you telling me that I have to custom code for a line break? Half of the images in your blog post are not working.

Can you elaborate on what you are trying to accomplish? If inside a RTF you can use a code embed. FYI: I was able to update the post so image issue resolved.

Is there an important step missing from the instructions? There is a line that reads “I added the ‘custom styles’ field binding to the Head”, but no instruction as to what that means or how its accomplished.

It looks like this is only possible on cms pages?

This was super helpful! Thank you.

1 Like

HI, I am not sure if this is helpful for anyone… but I had an issue with this in a certain use case and this worked for me making line breaks through RSS to Mailchimp.

A client writes a blog post.
The CMS has a rich text field for the blog and a multi line plain text field for the summary.
The summary gets posted as the RSS feed (cannot post Rich text feed to RSS) and that is picked up in mailchimp.
Mailchimp reads this as a chunk of text.
So… I created multiple paragraph fields (client is non technical, so telling them to insert
and work in

tags was not an option)…
Then in collection page settings I called back all of the summary blocks. But told the RSS feed to format each of the summary blocks as a new paragraph by placing it between the
<p> </p> tags.

Screenshot 2021-04-29 at 16.44.25

<![CDATA[<p>@@@</p><p>@@@</p><p>@@@</p><p>@@@</p>]]>

It can be tricky to read from text, so you can copy the code I used above and drop into your RSS item description and remove the “@@@” from each space and replace it with your fields as per the picture above.

If you are comfortable using markup… you can write HTML into your plain text box and it will appear in the RSS feed, so you might not need to create the 4 fields like I did for the client.
I have tested so far with
Paragraphs<p> </p> Line breaks<br> and Links <a href="https://yoursitehere.com" target="_blank"> Click Here <a>
Which have all worked nicely with mailchimp. I cannot comment on how this works with other services, but when I find out I will update if there are any issues or workarounds.

1 Like