Template:Pre2 View history

(Redirected from Template:PreWrap)
{{{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{{Template: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 Template:Pre2/doc.
Please add categories to the /doc subpage.
Subpages of this template.