Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

<pre> tags - Editor Strips out All Linebreaks...?


Go to End


1375 Views

Avatar
fogster

Community Member, 4 Posts

7 June 2008 at 12:52pm

Edited: 07/06/2008 12:53pm

When creating a page, SilverStripe will remove all linebreaks from the content. (I'm not talking about <br> tags, but if I put in a couple linebreaks, they're not there.)

This ordinarily wouldn't matter, as HTML doesn't pay them much notice.

BUT, I was trying to paste some text and use <pre> tags... Where the linebreaks do matter. When I put the text in and selected the Preformatted styling option, each line got put in its own pre tags, which looks horrible and isn't what I wanted to do. If I use the Edit HTML option, SilverStripe will strip out all of the linebreaks I put in.

I am running the latest SilverStripe (downloaded earlier today) on CentOS 5.1, using Firefox 3.

While I understand the reasoning behind what's going on, the way it works out in practice is less than intuitive, as it seems to be basically impossible to use preformatted text. I'm coming from WordPress, which has always handled this more 'intuitively.'