Template:Code: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
{{doc}} | {{doc}} | ||
<includeonly><onlyinclude><code style="border-radius:3px; | <includeonly><onlyinclude><code style="border-radius:3px; user-select:{{{select|unset}}}; {{{style|}}}">{{#if:{{{highlight|}}}|{{#tag:syntaxhighlight|{{{1}}}|lang={{{highlight}}}|inline=1|style="background-color:transparent;"}}|{{{1}}}}}</code></onlyinclude></includeonly> | ||
[[Category:Formatting templates]] | [[Category:Formatting templates]] | ||
Latest revision as of 02:57, 4 January 2025
Template Documentation [edit]
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:
|
Hello, World!Hello, World!Hello, World!Hello, World!Hello, World! | |
{{{select}}}
|
Text selection mode. Uses the user-select CSS property. Default value is unset.
|
Hello, World!Hello, World! | |
{{{style}}}
|
CSS styles. |
Hello, World! | |
{{{highlight}}}
|
Adds syntax highlighting for the language specified. |
<syntaxhighlight lang="c" inline="1" style="background-color:transparent;">int main() {return 0;} </syntaxhighlight> |