Template:CodeBlock/Doc: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
			
		
Note:The header is enabled automatically when you enter one of the following parameters.
		
	
 (Created page with "<noinclude>{{doc|0}}</noinclude>__NOTOC__ This template formats the text as a block of code.  ==Parameters and Examples== ===Main=== The main parameters are described below. {| class=standard-table width=100% ! style=width:10% | Name ! style=width:30% | Description ! Example ! style=width:27% | Preview |- | align=center | {{Code|{{Param|1}}}} | Your code.<br>It is recommended to wrap the template content with the {{Code|select=1|<nowiki>}} tag. | {{CodeBlock|marg...")  | 
			
(No difference) 
 | 
Latest revision as of 02:50, 4 January 2025
| Undocumented Template You can help the Open Fortress Wiki by writing it. Until then, you'll have to read the source to figure out how to use it anyway. Which, I mean, while you're over there already... just saying, you may as well...  | 
This template formats the text as a block of code.
Parameters and Examples
Main
The main parameters are described below.
| 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:
  | 
 | |
{{{height}}}
 | 
Controls the height of the block. | 
 | |
{{{lines}}}
 | 
Manual: Numbered lines. | 
 | |
{{{start}}}
 | 
What number to start numbering from (default value is 1). The value can be negative. | 
 | |
{{{highlight}}}
 | 
Adds syntax highlighting for the language specified.  | 
 | 
Header
The parameters for adding a header with the code source and the name of the programming language are described below.
| Name | Description | Example | Preview | 
|---|---|---|---|
{{{src}}}
 | 
The source of your code. | 
 | |
{{{lang}}}
 | 
The name of the language displayed on the right side of the header. | 
 |