Page 1 of 1

Plain Text Line Breaks in 1.3.9 r213

Posted: Fri 27. Jun 2008, 03:38
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

Re: Plain Text Line Breaks in 1.3.9 r213

Posted: Fri 27. Jun 2008, 08:13
by Heiko H.
Hi Evoplure,

please use the Replacement Tag [BR] for linebrakes


Good luck, Heiko...

Re: Plain Text Line Breaks in 1.3.9 r213

Posted: Sat 28. Jun 2008, 02:21
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 :? )

Re: Plain Text Line Breaks in 1.3.9 r213

Posted: Tue 1. Jul 2008, 01:26
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

Re: Plain Text Line Breaks in 1.3.9 r213

Posted: Tue 1. Jul 2008, 01:47
by Jensensen
well --> Plain Text is -->
[x]

SOLVED: Plain Text Line Breaks in 1.3.9 r213

Posted: Tue 1. Jul 2008, 18:46
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

Re: Plain Text Line Breaks in 1.3.9 r213

Posted: Tue 1. Jul 2008, 19:26
by Jensensen
Hi Ray,

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

another tip (to be more layout-specific)
[x]

Re: Plain Text Line Breaks in 1.3.9 r213

Posted: Wed 2. Jul 2008, 00:29
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

Re: Plain Text Line Breaks in 1.3.9 r213

Posted: Fri 4. Jul 2008, 14:43
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?

Re: Plain Text Line Breaks in 1.3.9 r213

Posted: Sat 9. Aug 2008, 12:19
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

Re: Plain Text Line Breaks in 1.3.9 r213

Posted: Tue 12. Aug 2008, 10:42
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...