Diferencia entre revisiones de «Plantilla:Pre2 Ver historial

(fixed double redirect)
(Página creada con «<pre<includeonly></includeonly> style="{{#ifeq:{{{1}}}|scroll|overflow:auto; width:auto;{{{style|}}}">{{#switch:{{{2}}}|nowiki|nw={{#tag:nowiki|{{{3}}}}}|{{{2}}}}}|white-sp...»)
 
Línea 1: Línea 1:
#REDIRECT [[Creating and editing road segments]]
<pre<includeonly></includeonly> style="{{#ifeq:{{{1}}}|scroll|overflow:auto; width:auto;{{{style|}}}">{{#switch:{{{2}}}|nowiki|nw={{#tag:nowiki|{{{3}}}}}|{{{2}}}}}|white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;{{{style|}}}">{{#switch:{{{1}}}|nowiki|nw={{#tag:nowiki|{{{2}}}}}|{{{1}}}}} }}</pre><noinclude>
{{Documentation}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS -->
</noinclude>

Revisión actual - 00:19 3 mar 2018

{{{1}}}
Documentation icon Template documentation[view] [edit] [history] [purge]

This template uses the <pre> parser tag and enables full word wrap or a horizontal scrollbox. This prevents text from wrapping past the right edge of the page.

It uses the style parameter
style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;"

inside of a <pre> parser tag

Usage

Use {{pre2}} to display unformatted text.

Wrapped text

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

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

To disable wikitext (e.g. [[links]]), <nowiki> tags must be used in the form:

{{Pre2|<nowiki>Your [[text]]{{tl|name=Pre2}}, which ''might'' include a {{tl|template}}.<noinclude>[[Category:Examples]]</noinclude></nowiki>}}

This will produce this:

Your [[text]]{{tl|name=Pre2}}, which ''might'' include a {{tl|template}}.<noinclude>[[Category:Examples]]</noinclude>

as opposed to:

Your text{{Plantilla:Pre2}}, which might include a {{template}}.

See also

  • {{pre}}, which mimics <pre> tags as rendered with the monobook Wikipedia skin
The above documentation is transcluded from Plantilla:Pre2/doc.
Please add categories to the /doc subpage.
Subpages of this template.