Diferencia entre revisiones de «Plantilla:Pre2/doc Ver historial

(fixed double redirect)
(Página creada con «{{doc subpage}} This template uses the {{tag|pre|o}} parser tag and enables full word wrap or a horizontal scrollbox. This prevents text from wrapping past the right edge o...»)
 
Línea 1: Línea 1:
#REDIRECT [[Creating_and_editing_road_segments#Editing_existing_roads]]
{{doc subpage}}
This template uses the {{tag|pre|o}} 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 <pre style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;">
style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;"
</pre>
inside of a {{tag|pre|o}} parser tag
 
== Usage ==
Use {{tl|pre2}} to display unformatted text.
 
=== Wrapped text ===
<span style="background-color:white"><code><nowiki>{{Pre2|Text to be displayed. And more and more and more... and a paragraph break.</nowiki>
<br/><br/>
<nowiki>And then more and more...}}</nowiki></code></span>
:produces:
{{Pre2|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===
<span style="background:white"><code><nowiki>{{Pre2|scroll|Text to be displayed. And more and more and more... and a paragraph break.</nowiki>
<br/><br/>
<nowiki>And then more and more...}}</nowiki></code></span>
:produces:
{{Pre2|scroll|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 {{anchor|wikitext}} ==
 
To disable [http://en.wikipedia.org/wiki/Wikipedia:Wikitext wikitext] (e.g. <nowiki>[[</nowiki>[http://en.wikipedia.org/wiki/Wikipedia:Wikitext links]<nowiki>]]</nowiki>), &lt;nowiki> tags must be used in the form:
 
<span style="background:white"><code><nowiki>{{Pre2|&lt;nowiki>Your [[text]]{{tl|name=Pre2}}, which ''might'' include a {{tl|template}}.<noinclude>[[Category:Examples]]</noinclude>&lt;/nowiki>}}</nowiki></code></span>
 
This will produce this:
{{Pre2|<nowiki>Your [[text]]{{tl|name=Pre2}}, which ''might'' include a {{tl|template}}.<noinclude>[[Category:Examples]]</noinclude></nowiki>}}
 
as opposed to:
{{Pre2|Your [[text]]{{tl|name=Pre2}}, which ''might'' include a {{tl|template}}.<noinclude>[[Category:Examples]]</noinclude>}}
 
== See also ==
* {{tl|pre}}, which mimics &lt;pre&gt; tags as rendered with the monobook Wikipedia skin
 
<includeonly>
<!-- ADD CATEGORIES BELOW THIS LINE -->
[[Category:Text formatting templates]]
<!-- ADD INTERWIKIS BELOW THIS LINE -->
 
</includeonly>

Revisión actual - 00:20 3 mar 2018

This is a documentation subpage for Plantilla:Pre2.
It contains usage information, categories and other content that is not part of the original plantilla page.

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/doc}}, which might include a {{template}}.

See also

  • {{pre}}, which mimics <pre> tags as rendered with the monobook Wikipedia skin