[Mediawiki-l] <pre>

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


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Moin,

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;">
	</pre>

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:

	{{pre|txt=
	my very very long long line here
	}}

Hope that helps,

Tels
 
- -- 
 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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iQEVAwUBRan0MXcLPEOTuEwVAQLk1wf/VMX1qztej20tZUlNTumxJDbg3zwB52yE
vVPA/9uH8yB6hm3WdniA9N/R7xFyVRHKs18o/0iX+miCedW8NEFU9wPtDWBNn2+i
q2LKmjNPzx7Xr925oH2sAuwYTPrhEbjElLX7HfmQO1NirFeiIyAHAXyL/okh65N1
o4yL1JvUaA+7uOFGbY47abMnwHCj2OD2TIy/lTu1FYpdHNb/o5p27l+TsOYNby5U
QUepGdW+yUxBV/B9tqzJVWbf1SjH+zo7F3P2xwMPwswAPPnaMB8AFYb4KnDU7ua2
cx29MzsEC1E7ezBnsLNFXjGdCd1gfjvv/djXVeZFQSWXlk+tZjBMtg==
=czEx
-----END PGP SIGNATURE-----



More information about the MediaWiki-l mailing list