[xwiki-users] line breaks

Esbach, Brandon Esbachb at tycoelectronics.com
Thu Jul 27 17:13:41 CEST 2006


Ok, this is gonna be longwinded and boring to most of you out there I
reccon (and sorry Duke if you know this already, just ignore it in that
case):
 
This is an HTML thing which affects all browsers - not just for xwiki,
but any web application under normal circumstances, for text rendered by
the browser.
Why this happens is fairly simple (ok, dusty memory but here's a stab at
it).  Generally speaking, any spaces (and characters that result in
"space" such as line breaks, tabs, etc); are regarded as "whitespace" in
html.  Whitespace is ignored when there is more than one single
whitespace character - so you could add a bunch of tabs, spaces,
linebreaks, etc between a word, and it will be regarded as one single
space.
Putting in specific codes tells the HTML engine what you're wanting to
do.  For example:
Line1     Line2 will become Line1 Line2
-But-
Line1    Line2 will become Line1    Line2 (  is
the code for non-breaking-space)
 
As the text is rendered by the browser, there is not much you can do to
change it
I guess one could wrap text into a non-HTML rendering object perhaps,
like a textarea - but note that anything you do to change this, affects
rendering of the page; and could unexpectedly break flexibility
elsewhere
 
________________________________

From: Duke Tantiprasut [mailto:duketantiprasut at gmail.com] 
Sent: 27 July 2006 15:58
To: xwiki-users at objectweb.org
Subject: [xwiki-users] line breaks


Hi All,

Does any find that the way line breaks are handled are a bit counter
intuitive. For example, if I enter:

line1
line2

you get:

line1line2

so to get results that you would normally expect, you would have to do
something like: 

line1<br/>
line2<br/>

which is pretty ugly. I thought I can live with it but it's starting to
bug me too much.

Suggestions?

Duke

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xwiki.org/pipermail/users/attachments/20060727/7159fb63/attachment-0001.htm 


More information about the users mailing list