Template:Pre2/doc

Template page
< Template:Pre2
Revision as of 01:19, 18 January 2023 by Momo (talk | contribs) (Created page with "{{Documentation}} {{tl|Pre2}}} uses <code>{{WP|ref=no|HTML_element#Other_containers|<pre>}}</code> tags, but with text that is either {{WP|ref=no|word wrap|wrapped}} or is contained in a horizontal scrollbox. This means the text will not stretch past the right side of the screen. As it uses real <pre> tags (unlike {{tl|pre}}), it will be displayed correctly regardless of how the user's Wikipedia {{WP|ref=no|WP:SKIN|text=skin}} renders <pre> boxes. If...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

{{Pre2}}} uses Wikipedia-logo-v2.svg HTML_element#Other_containers

tags, but with text that is either Wikipedia-logo-v2.svg wrap word wrap

or is contained in a horizontal scrollbox. This means the text will not stretch past the right side of the screen.

As it uses real <pre> tags (unlike {{pre}}), it will be displayed correctly regardless of how the user's Wikipedia Wikipedia-logo-v2.svg skin

renders <pre> boxes.

If you want to disable Wikipedia-logo-v2.svg wikitext

in it, you should use <nowiki> tags inside the template (see below).

Usage

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.

Style

When the text contains links is better to change the text color, thus highlighting:

{{Pre2|style=color:green|Text to be [[Hyperlink|link]]. WARNING! A{{=}}B, you must use Template:=. And more and more and more... and a paragraph break.

And then more and more...}}

produces:
Text to be link. WARNING! A=B, you must use Template:=. 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.