[Mediawiki-l] <pre>

Mauro do Carmo mauro at carmo.info
Sun Jan 14 18:39:07 UTC 2007


Thanks so much for the tips, but unfortunately it didn't work in y wiki version
1.6.8 :(

However, we are almost there: look the two examples we have below. The only
thing I need now is to have the border of the tag <pre> into the tag <div>. So,
I have to change this border: 1px dotted #aaa in some how, in order to get the
appearance of the border of the tag <pre>.

Thanks a lot, []'s mauro.

----1-----
<pre>
long line long line long line long line long line long line long line long line
long line long linelong line long line long line long line long linelong line
long line long line long line long linelong line long line long line long line
</pre>

----2-----

<div id="sandbox_warning" style="padding:5px; background: #f9f9f9; border: 1px
dotted #aaa; border-bottom-width: 2px;">
long line long line long line long line long line long line long line long line
long line long linelong line long line long line long line long linelong line
long line long line long line long linelong line long line long line long line
</div>
---------





|-----Original Message-----
|From: mediawiki-l-bounces at lists.wikimedia.org [mailto:mediawiki-l-
|bounces at lists.wikimedia.org] On Behalf Of Tels
|Sent: Sunday, January 14, 2007 1:13 AM
|To: MediaWiki announcements and site admin list
|Subject: Re: [Mediawiki-l] <pre>
|
|-----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-----
|
|_______________________________________________
|MediaWiki-l mailing list
|MediaWiki-l at lists.wikimedia.org
|http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
|
|--
|No virus found in this incoming message.
|Checked by AVG Free Edition.
|Version: 7.5.432 / Virus Database: 268.16.10/624 - Release Date: 1/12/2007 2:04
|PM
|

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.10/624 - Release Date: 1/12/2007 2:04
PM
 



More information about the MediaWiki-l mailing list