Template:CodeBlock/doc: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
|||
Line 1: | Line 1: | ||
<noinclude>{{DISPLAYTITLE:Template: Code Block/doc}}{{doc|0}}</noinclude>__NOTOC__ | <noinclude>{{DISPLAYTITLE:Template: Code Block/doc}}{{doc|0}}</noinclude>__NOTOC__ | ||
This template | This template formats the text as a block of code. | ||
== Parameters and Examples == | == Parameters and Examples == |
Revision as of 10:22, 27 January 2023

This is a documentation subpage for Template:CodeBlock.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
This template formats the text as a block of code.
Parameters and Examples
Main
Name | Description | Example | Preview |
---|---|---|---|
{{{1}}}
|
Your code. It is recommended to wrap the template content with the <nowiki> tag.
|
||
{{{margin}}}
|
Controls margins. | ||
{{{style}}}
|
The style of the template. The following styles are available:
|
||
{{{limited}}}
|
Limits the block height to 400 pixels and enables scrolling. | See below | |
{{{height}}}
|
Controls the height of the block. Does not work without {{{limited}}}. The maximum height is 400 pixels. |
Header
Name | Description | Example | Preview |
---|---|---|---|
{{{header}}}
|
Includes a block header to display the source and language name. | ||
{{{src}}}
|
The source of your code. | ||
{{{lang}}}
|
The name of the language displayed on the right side of the header. |