Plain Text Line Breaks in 1.3.9 r213

Please post all install related problems here. Visit this forum first for troubleshooting.
Post Reply
Evoplure
Posts: 43
Joined: Fri 8. Jul 2005, 02:59

Plain Text Line Breaks in 1.3.9 r213

Post by Evoplure »

Hello,
After installing 1.3.9 r213 (congratulations Oliver, good stuff there!) I realised that two or more line breaks in a paragraph when using the Plain Text content part are not shown on the frontend as spaces between lines...

It seems that it is because they are replaced for a (just one) <p> tag, instead of several <br> ones. That is particulary annoying for me: sometimes I want to control a variable amount of space between lines. Now I can only set the space between paragraphs using the style for <p> in the css stylesheet, and that is always the same amount of space regardless the line breaks I introduce in the backend ( the number of times press enter between lines)...

Is that a bug? Is it a problem of my installation? any suggestion?

Thanks a million for your help
* Maybe I'm wrong * Maybe not *
User avatar
Heiko H.
Posts: 868
Joined: Thu 27. Oct 2005, 11:41
Location: Dresden
Contact:

Re: Plain Text Line Breaks in 1.3.9 r213

Post by Heiko H. »

Hi Evoplure,

please use the Replacement Tag [BR] for linebrakes


Good luck, Heiko...
Not longer here - sorry...

Haubner-IT GbR Dresden
Evoplure
Posts: 43
Joined: Fri 8. Jul 2005, 02:59

Re: Plain Text Line Breaks in 1.3.9 r213

Post by Evoplure »

thanks a million heiko

basically it works, using [BR] replacement tags I can modify the amount of space between the end of a paragraph and the beginning of the next one...

but there are some disadvantages...

1. personal disadvantage: unfortunately my website has more than 100 pages, most of them using the Plain Text content part... and I never used the [BR] tag to introduce a blank space between paragraphs... I can't check now every page to find where I should have introduced the [BR] tag instead of pressing the 'enter' key two or more times. I am very surprised to find that nobody else seems to have the same problem (that's why I thought that something was wrong with my installation...)

2. it goes against the idea of a real 'plain text' content part: that means that when you use a plain text editor you don't need to introduce any tag if you want to separate lines or paragraphs... you just press the enter key two or more times... I can't understand why do we need to use a tag or change the style sheet now for such a basic thing in phpwcms :!:



nb. ... and changing the style sheet does change each place in which the <p> tag is used (not only the space between paragraphs :? )
* Maybe I'm wrong * Maybe not *
rescamilla
Posts: 69
Joined: Sun 25. Jul 2004, 01:53

Re: Plain Text Line Breaks in 1.3.9 r213

Post by rescamilla »

Same problem here. This was a suprise for me.

I have thousands of articles on one of my sites (a government site). My habit was to use plain text for all normal text content. Now I'll have a site full of paragraphs that have no spacing between them.

In the past, the PLAIN TEXT content part obeyed line breaks. I can't go in and add [BR]'s to everything.

We need a fix please.

-Ray
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: Plain Text Line Breaks in 1.3.9 r213

Post by Jensensen »

well --> Plain Text is -->
[x]
Last edited by Jensensen on Sat 20. Sep 2008, 23:11, edited 1 time in total.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
rescamilla
Posts: 69
Joined: Sun 25. Jul 2004, 01:53

SOLVED: Plain Text Line Breaks in 1.3.9 r213

Post by rescamilla »

Evoplure,

Put this at the bottom of your style sheet:

Code: Select all

p {padding-bottom: 20px; }
(edit the value to your taste. ex: "1em")

-Ray
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: Plain Text Line Breaks in 1.3.9 r213

Post by Jensensen »

Hi Ray,

good to here this. So, you could solve the problem?

another tip (to be more layout-specific)
[x]
Last edited by Jensensen on Sat 20. Sep 2008, 22:19, edited 1 time in total.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
rescamilla
Posts: 69
Joined: Sun 25. Jul 2004, 01:53

Re: Plain Text Line Breaks in 1.3.9 r213

Post by rescamilla »

Jensensen,

Yes, this is solved.

In previous versions, Plain Text was rendered up as:

Code: Select all

<p>asdasd asdasd asdada asdasd asdad dfzs sdf.<br>
lksdlksdf lskdfoi liuhrw,m sd lksdfl lksdflk ,ksdnf.<br>
jsdfkjs skdfhu lhdlkjsf kshdflksf lkjshdflk wner.</p>
But the latest 1.3.9 renders plain text as:

Code: Select all

<p>asjd;laksdjklad asda asdad asdad asd  ssdf.</p>
<p>sdfsdf sdfksjdfl slkdflskf slkdfs sldkfs lekj.</p>
<p>lkckzhxc asjdfhas ,asdla askdnadasd lakjd.</p>
So... the padding element in the style sheet will fix the problem.

-Ray
Evoplure
Posts: 43
Joined: Fri 8. Jul 2005, 02:59

Re: Plain Text Line Breaks in 1.3.9 r213

Post by Evoplure »

Thanks all for your comments that have been very useful. For me the problem is solved following your suggestions. :)

I don't know how could "main_column p {... }" be implemented, because it does not work from the main stylesheet :( , but the option of defining the style for <p> is good enough for my website.

Someone else could still have some problems:

in previous versions several line breaks together, like <br><br><br><br>

are now rendered by a single <p> tag, regardless of the number of line breaks.

that means that the space between paragraphs will be always the value in the style sheet, regardless the amount of lines that you put between paragraphs... In other words... You can't add more space if you don't use the [BR] tag several times.

But I suppose that's not a big problem for most phpwcms users...

=====

added 29.07.08: CSS solution seems not be very useful between 2 image tags {IMAGE...}, [BR] should be used instead

I think it would be nice for the next Phpwcms version if Plaint Text Content Part work like in previous versions, wouldn't be?
* Maybe I'm wrong * Maybe not *
User avatar
Oliver Georgi
Site Admin
Posts: 9906
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: Plain Text Line Breaks in 1.3.9 r213

Post by Oliver Georgi »

This was changed to get more valid page rendering. <br><br> always result in too big spaces (in my eyes).

It still supports <br> but only for single line break - all plain text sections divided by double line break will be wrapped by <p> tag.

I always recommend to wrap the {CONTENT} in special <div id="content">{CONTENT}</div> - then it can be defined much easier by CSS like

Code: Select all

#content p {
  padding: 0 0 .5em 0;
}
Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: Plain Text Line Breaks in 1.3.9 r213

Post by update »

Please see p tag problem here also : http://forum.phpwcms.org/viewtopic.php? ... 44#p107644
all plain text sections divided by double line break will be wrapped by <p> tag
This would be ok, but all text is wrapped in p tags anyway...hmm I'm quite sure that I don't like this...
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Post Reply