Skabelon:Pre2
<pre style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;">{{{1}}}
{{Pre2}} uses <pre> tags, but with text that is either wrapped or is contained in a horizontal scrollbox. This means the text will not stretch past the right side of the screen.
As it uses real <pre> tags (unlike {{pre}}), it will be displayed correctly regardless of how the user's Wikipedia skin renders <pre> boxes.
If you want to disable wikitext in it, you should use <nowiki> tags inside the template (see below).
Usage
[rediger kildetekst]Wrapped text
[rediger kildetekst]{{Pre2|Text to be displayed. And more and more and more... and a paragraph break.
And then more and more...}}
- produces:
Text to be displayed. And more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and a paragraph break. And then more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more.
Scrollbox
[rediger kildetekst]{{Pre2|scroll|Text to be displayed. And more and more and more... and a paragraph break.
And then more and more...}}
- produces:
Text to be displayed. And more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and a paragraph break. And then more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more.
Using wikitext
[rediger kildetekst]To disable wikitext (e.g. [[links]]), <nowiki> tags must be used in the form:
{{Pre2|<nowiki>Your [[text]]{{dn|name=Pre2}}, which ''might'' include {{tl|templates}}.<noinclude>[[Category:Examples]]</noinclude></nowiki>}}
This will produce this:
{{#parsoid
as opposed to:
Your [[text]]<sup class="noprint Inline-Template " style="white-space:nowrap;">[<i>[[:Kategori:Artikler med flertydige links som ønskes præciseret|<span title="Dette link fører til en flertydig-side; der ønskes hjælp til at ændre linket til et præcist link">flertydigt link ønskes præciseret</span>]]</i>]</sup>, which ''might'' include {{[[Skabelon:templates|templates]]}}.
See also
[rediger kildetekst]- {{pre}}, which mimics <pre> tags as rendered with the monobook Wikipedia skin
- <pre>…</pre>
- Word wrapping