Template: Code Block/doc

From Valve Developer Community
Jump to navigation Jump to search
English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Edit-copy.png
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.

This template allows text to be formatted as a Markdown-style block of code.

Usage

Just insert {{MdCodeBlock|YourText}} into the page and replace YourText with your content to make the code block styling work.


Manage Wiki Formatting:
You can use <nowiki>YourText</nowiki> to disable processing of various commands that allow the wiki to style your text. Also, it can disable the template style.


Switching Styles:
Insert style| after {{MdCodeBlock| and replace stylename with the name of an existing style.


Using Modifiers:
Insert modifier=YourText| after {{MdCode| or style| and replace "modifier" with the name of an existing modifier. After the equal sign, you need to write the properties corresponding to the modifier.


Adding a Block Header:
A description of including a header in a block can be found here.

Styles

Name Description
default enabled by default, but disabled if other styles are activated
limited default design with limited height (after reaching the maximum, scrolling will be activated)
outline less saturated version with outline
outline-limited same as outline, but with a limited height (after reaching the maximum, scrolling will be activated)

Modifiers

Name Description
height controls the height of styles with limited height (default auto)
margin controls margin (default 5px 0 0 0)

Examples

Template:MdCodeBlock

Template:MdCodeBlock


Template:MdCodeBlock

Template:MdCodeBlock