Page 1 of 1
CP Plain Text is wrapping content with p tags
Posted: Tue 12. Aug 2008, 09:33
by update
I'm observing that the content of CP "Plain Text" is wrapped between p-tags. Has this been this way before ore do some changes take place?
Version used: 248 compared with version DEC 2007
This is some behavior which is now disturbing some of my older layouts, inserting these tags, which are then wrapping a Custom_blocks div. Not so good...
I wonder how I can circumvent this....
Re: CP Plain Text is wrapping content with p tags
Posted: Tue 12. Aug 2008, 09:41
by flip-flop
Re: CP Plain Text is wrapping content with p tags
Posted: Tue 12. Aug 2008, 09:49
by update
Thanks for clarifying
But this is rendering nasty output now (example - see p wrapping div):
Code: Select all
<div class="redBox">
<div class="redBoxHead">
<h3>more</h3>
</div>
<div class="redBoxContent">
<p><div class="articleText"><p>test</p></div></p>
</div>
......
</div>
Only chance would be to style .redBoxContent p {..... but it will still throw a warning that it's an empty tag.... hmmm
Really overlooked this one - plain text isn't plain text anymore... Sh..
Re: CP Plain Text is wrapping content with p tags
Posted: Tue 12. Aug 2008, 10:38
by update
Wouldn't it be much simpler to just insert the p tag into the plain text template thus wrapping {TEXT} and nothing else? Then it would be possible to delete it if not needed...
Re: CP Plain Text is wrapping content with p tags
Posted: Tue 12. Aug 2008, 10:57
by flip-flop
You are right, please insert a new issue. ->
http://code.google.com/p/phpwcms/issues/list
Re: CP Plain Text is wrapping content with p tags
Posted: Tue 12. Aug 2008, 11:10
by update
done...
Re: CP Plain Text is wrapping content with p tags
Posted: Tue 12. Aug 2008, 12:22
by Oliver Georgi
Issue was rejected - it is a feature and can be solved by user very easy using simple css.
Oliver
Re: CP Plain Text is wrapping content with p tags
Posted: Tue 12. Aug 2008, 12:24
by Oliver Georgi
claus wrote:
Code: Select all
<div class="redBox">
<div class="redBoxHead">
<h3>more</h3>
</div>
<div class="redBoxContent">
<p><div class="articleText"><p>test</p></div></p>
</div>
......
</div>
This is false HTML - so think twice when you have something like this:
Code: Select all
<p><div></div></p> - will always fail.
This is no problem
Code: Select all
<div class="articleText"><p>test</p></div>
Summary:
<p> tag cannot wrapped around <div>
Re: CP Plain Text is wrapping content with p tags
Posted: Tue 12. Aug 2008, 12:59
by update
Oliver Georgi wrote:<p><div></div></p> - will always fail.
This is correct - but it isn't my own input. This is a result of the new automatically-p-tags-wrapping feature and is occurring when I put a CUSTOM_BLOCK into the plain text CP (this one will be wrapped with that p-tag) and fill it with another CP then, which itself is already wrapped with a div automatically.
Then you will see this output plopping up...
Re: CP Plain Text is wrapping content with p tags
Posted: Tue 12. Aug 2008, 20:41
by Oliver Georgi
a custom block in CP plain text is false!!!
You must use HTML then because it can deliver HTML!
Oliver
Re: CP Plain Text is wrapping content with p tags
Posted: Tue 12. Aug 2008, 21:12
by update
I will rebuild them all - but have been thinking that it would be a good idea, because plain text can be templated.... anyway - I'm on the road of changing it already
(btw this has been my private "yaml" column input technique before yaml and almost the same as described by Santcho now and basically it's cool - and will become even cooler, when I'm finished changing it
[I hope
])