Template:MdCode/doc: Difference between revisions
m (→Examples) |
mNo edit summary |
||
| Line 13: | Line 13: | ||
<br>'''Using Modifiers:'''<br> | <br>'''Using Modifiers:'''<br> | ||
Insert {{MdCode|outline-oneclick|<nowiki>modifier=|</nowiki>}} after {{MdCode|outline-oneclick|<nowiki>{{MdCode|</nowiki>}} or {{MdCode|outline-oneclick|<nowiki>style|</nowiki>}} and replace '''"modifier"''' with the name of an existing modifier. After the equal sign, you need to write the properties corresponding to the modifier. | Insert {{MdCode|outline-oneclick|<nowiki>modifier=YourText|</nowiki>}} after {{MdCode|outline-oneclick|<nowiki>{{MdCode|</nowiki>}} or {{MdCode|outline-oneclick|<nowiki>style|</nowiki>}} 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 == | == Styles == | ||
Revision as of 09:38, 7 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|onelick|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