Plantilla:Pre2/doc Ver historial

Revisión del 00:20 3 mar 2018 de Santyg2001 (discusión | contribs.) (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...»)
(difs.) ← Revisión anterior | Revisión actual (difs.) | Revisión siguiente → (difs.)
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