Template:CodeBlock/doc: Difference between revisions
(Created page with "<noinclude>{{DISPLAYTITLE:Template: Markdown Code Block/doc}}{{doc|0}}</noinclude>__NOTOC__ This template allows text to be formatted as a Markdown-style block of code. == Us...") |
mNo edit summary |
||
Line 1: | Line 1: | ||
<noinclude>{{DISPLAYTITLE:Template: | <noinclude>{{DISPLAYTITLE:Template: Code Block/doc}}{{doc|0}}</noinclude>__NOTOC__ | ||
This template allows text to be formatted as a Markdown-style block of code. | This template allows text to be formatted as a Markdown-style block of code. | ||
Revision as of 08:51, 22 January 2023

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