Modèle:Pre2/doc

De Wiki Electrolab
< Modèle:Pre2
Révision datée du 1 mai 2023 à 13:22 par Electrolab (discussion | contributions) (Page créée avec « {{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> box... »)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (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.


Les cookies nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de cookies.