[Mediawiki-l] <pre>

Tels nospam-abuse at bloodgate.com
Sun Jan 14 09:13:21 UTC 2007

Hash: SHA1


On Sunday 14 January 2007 01:53, Mauro do Carmo wrote:
> Thanks for the tips, but I really would like the same effect of <pre> tag
> as the blue backgroundcolor, the border, and the rectangular format, all
> of that within the limit of the border of the browser's window.
> Normally if you use the tag <pre> and type a long line within it, the
> line goes forever in the horizontal over the browser's window. I have
> even to scroll right the page in order to see the long line. I don't want
> that. I want the line break naturally when it reaches the vertical border
> of the browser's window.
> Thanks you so much, []'s mauro.

Normally, you could just use "style" with pre like so:

	<pre style="max-width: 65em;">

width=90% should work, too, but I haven't tested that.

At leats in former mediawiki releases that was the case, and it got broken 
somewhere along the line. I am not sure it still works in the latest 
release. As a workaround you might enable the use of "style" with the "pre" 
tag in the Sanitizer source code, which should be somewhere in 
Sanitizer.php or something like that.

When it works, you can just create a template called pre like so:

	<pre style="...">{{{txt|enter text here}}}</pre>

Then use it like so:

	my very very long long line here

Hope that helps,

- -- 
 Signed on Sun Jan 14 10:10:17 2007 with key 0x93B84C15.
 View my photo gallery: http://bloodgate.com/photos
 PGP key on http://bloodgate.com/tels.asc or per email.

 "Blogebrity: Wow, guess what this one stands for? Too easy. Hey, anyone
 can do it: take a blogger who's a chef, and you get: BLEF. A blogger
 who's a dentist? BENTIST. A female blogger with an itch? You guessed it:
 a BITCH." -- maddox from xmission

Version: GnuPG v1.4.2 (GNU/Linux)


More information about the MediaWiki-l mailing list