Template:Code

From Zombie Panic! Official Wiki
Revision as of 05:41, 21 July 2025 by Wuffesan (talk | contribs) (Created page with "{{doc}} <includeonly><onlyinclude><span style="font-family:monospace; {{#switch:{{{p|{{{preset|}}}}}} |#default = padding:2px 4px; border-radius:3px; background:rgb(0 0 0 / 26%); |0 = |1 = padding:2px 4px; border-radius:3px; background:rgb(0 0 0 / 16%); |2 = padding:1px 3px; border-radius:3px; background:rgb(0 0 0 / 16%); border:1px solid rgb(255 255 255 / 10%); |3 = padding:1px 3px; border-radius:3px; background:rgb(255 255 255 / 5%); border:1px solid rgb(255 255...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Documentation icon Template documentation
Note: parts of or the entire template might not be visible without values provided.

This template will allow you to format text as a one-line code.

Parameters and Examples

Parameters Description Examples Preview
{{{preset}}} Preset Template Styles. The following presets are available:
  • Default – The default style is based on Markdown;
  • 0 – Clear version;
  • 1 – Desaturated version;
  • 2 – Outlined version;
  • 3 – A brighter outlined version.
{{Code|Hello, World!}}
{{Code|preset=0|Hello, World!}}
{{Code|preset=1|Hello, World!}}
{{Code|preset=2|Hello, World!}}
{{Code|preset=3|Hello, World!}}
Hello, World!
Hello, World!
Hello, World!
Hello, World!
Hello, World!
{{{select}}} Text selection mode. Uses the user-select CSS property. Default value is unset.
{{Code|select=none|Hello, World!}}
{{Code|select=all|Hello, World!}}
Hello, World!
Hello, World!
{{{style}}} CSS styles.
{{Code|style=color:#EF9B9B|Hello, World!}}
Hello, World!
{{{highlight}}} Adds syntax highlighting for the language specified.
File:Icon-Bug.pngBug:Condenses code into one line.  [todo tested in ?]
Error: mutually exclusive parameters |only= with |since= and/or |fixed= provided.
{{Code|highlight=c|int main() {return 0;} }}
int main() {return 0;}

Template:Doc/Sandbox other