Template:MdCode/doc: Difference between revisions
mNo edit summary |
m (fixed typo) |
||
Line 54: | Line 54: | ||
{{MdCode|<nowiki>{{MdCode| | {{MdCode|<nowiki>{{MdCode|oneclick|background=rgb(230,230,230)|color=black|Go to '''[[Main Page|Main Page]]'''}}</nowiki>}} {{MdCode|<nowiki>{{MdCode|background=rgb(40,60,100)|Go to {{hla|4}}}}</nowiki>}} | ||
{{Documentation/PreviewBlock|{{MdCode|oneclick|background=rgb(230,230,230)|color=black|Go to '''[[Main Page|Main Page]]'''}} {{MdCode|background=rgb(40,60,100)|Go to {{hla|4}}}}}} | {{Documentation/PreviewBlock|{{MdCode|oneclick|background=rgb(230,230,230)|color=black|Go to '''[[Main Page|Main Page]]'''}} {{MdCode|background=rgb(40,60,100)|Go to {{hla|4}}}}}} | ||
Revision as of 12:58, 9 December 2022

Don't forget to purge the contents of the base page upon creating or editing this subpage.
This template will allow you to format text as a one-line code in Markdown style.
Usage
Just insert {{MdCode|YourText}}
into the page and replace YourText with your content to make the one-line code 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 {{MdCode|
and replace "style" 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.
Styles
Name | Description |
---|---|
default |
enabled by default, but disabled if other styles are activated |
oneclick |
default style with one click selection |
desaturated |
less saturated version |
desaturated-oneclick |
desaturated style with one click selection |
outline |
less saturated version with outline |
outline-oneclick |
outline style with one click selection |
Modifiers
Name | Description |
---|---|
background |
allows you to change the background color if the default style is enabled |
color |
allows you to change the color of the text if the default style is enabled |
Examples
{{MdCode|Go to [[Main Page|Main Page]]}}
{{MdCode|Go to {{hla|4}}}}
Go to Main Page
Go to
Half-Life: Alyx
{{MdCode|desaturated|Go to [[Main Page|Main Page]]}}
{{MdCode|desaturated|Go to {{hla|4}}}}
Go to Main Page
Go to
Half-Life: Alyx
{{MdCode|outline|Go to [[Main Page|Main Page]]}}
{{MdCode|outline|Go to {{hla|4}}}}
Go to Main Page
Go to
Half-Life: Alyx
{{MdCode|oneclick|background=rgb(230,230,230)|color=black|Go to '''[[Main Page|Main Page]]'''}}
{{MdCode|background=rgb(40,60,100)|Go to {{hla|4}}}}
Go to Main Page
Go to
Half-Life: Alyx