Vorlage:Pre: Unterschied zwischen den Versionen
K 1 Version importiert |
Keine Bearbeitungszusammenfassung |
||
| Zeile 1: | Zeile 1: | ||
<pre<includeonly></includeonly> style="{{#if:{{{background|}}}|background:{{{background|}}};}}{{#if:{{{color|}}}|color:{{{color|}}};}}{{#if:{{{width|}}}|width:{{{width|}}};}}white-space:{{#switch: | {{#if:{{{title|}}}|<div style="margin:0;line-height: 1.0;">''{{{title}}}''</div>}}<pre<includeonly></includeonly> style="margin-top:0; padding:8px; {{#if:{{{background|}}}|background:{{{background|}}};}} {{#if:{{{color|}}}|color:{{{color|}}};}} {{#if:{{{width|}}}|width:{{{width|}}};}} white-space:{{#switch:{{lc:{{{space|}}}}}|pre-wrap||#default=pre-wrap}}"><!-- | ||
}}"><!-- | |||
-->{{#if:{{{1|}}}|{{{1}}}<noinclude>|Sample text | -->{{#if:{{{1|}}}|{{{1}}}<noinclude>|Sample text | ||
on several lines</noinclude>}}<!-- | on several lines</noinclude>}}<!-- | ||
| Zeile 24: | Zeile 22: | ||
--></pre><noinclude> | --></pre><noinclude> | ||
'''Usage''' | '''Usage''' | ||
<pre>{{Pre|1= |background= |color= |width= |space= }} </pre> | <pre>{{Pre|title=| 1= |background= |color= |width= |space= }} </pre> | ||
All parameters are optional: | All parameters are optional: | ||
Aktuelle Version vom 28. August 2026, 13:10 Uhr
Sample text on several lines
Usage
{{Pre|title=| 1= |background= |color= |width= |space= }}
All parameters are optional:
- |1= the text to present (may include markup and templates to expand; note that automatic syntaxhighliting is not supported; the default text is empty).
- |background= |color= – set alternate colors (in CSS format); for passing CSS colors using a compact numeric format starting with a sharp sign # followed by hexadecimal digits (3 or 6 digits for RGB colors, 4 or 8 digits for RGBA colors), you may need to escape it by a leading empty tag, so that it won't be interpreted by MediaWiki as a numbered list item when it preprocesses parameters given to the template, or use a template generating the color syntax.
- |width= – CSS width for the generated <pre></pre> parent element (useful in table cells).
- |space= – one of the values accepted for the CSS white-space: attribute (pre-wrap by default to preserve newlines in the text given in 1st parameter but still allow wrapping overlong lines, without overflowing the width or using an horizontal scrollbar)