Template:Pre2/doc View history

Revision as of 22:11, 3 August 2014 by Kentsmith9 (talk | contribs) (renamed category)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This is a documentation subpage for Template:Pre2.
It contains usage information, categories and other content that is not part of the original template 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{{Template:Pre2/doc}}, which might include a {{template}}.

See also

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