Template:MdCode/doc: Difference between revisions
m (→Usage) |
mNo edit summary |
||
| Line 37: | Line 37: | ||
== Preview == | == Preview == | ||
<div style="user-select: none; pointer-events: none;"> | |||
Default: {{MdCode|Go to [[Main_Page|Main Page]]}} {{MdCode|<nowiki>Go to [[Main_Page|Main Page]]</nowiki>}} {{MdCode|Go to {{hla|4}}}} {{MdCode|<nowiki>Go to {{hla|4}}</nowiki>}} | Default: {{MdCode|Go to [[Main_Page|Main Page]]}} {{MdCode|<nowiki>Go to [[Main_Page|Main Page]]</nowiki>}} {{MdCode|Go to {{hla|4}}}} {{MdCode|<nowiki>Go to {{hla|4}}</nowiki>}} | ||
| Line 42: | Line 43: | ||
Outline: {{MdCode|outline|Go to [[Main_Page|Main Page]]}} {{MdCode|outline|<nowiki>Go to [[Main_Page|Main Page]]</nowiki>}} {{MdCode|outline|Go to {{hla|4}}}} {{MdCode|outline|<nowiki>Go to {{hla|4}}</nowiki>}} | Outline: {{MdCode|outline|Go to [[Main_Page|Main Page]]}} {{MdCode|outline|<nowiki>Go to [[Main_Page|Main Page]]</nowiki>}} {{MdCode|outline|Go to {{hla|4}}}} {{MdCode|outline|<nowiki>Go to {{hla|4}}</nowiki>}} | ||
</div> | |||
<includeonly>{{sandbox other|| | <includeonly>{{sandbox other|| | ||
[[Category:Markdown]] | [[Category:Markdown]] | ||
}}</includeonly> | }}</includeonly> | ||
Revision as of 05:15, 12 November 2022
Don't forget to purge the contents of the base page upon creating or editing this subpage.
This template allows you to format text as a one-line code in Markdown style.
As you can see, this is not real Markdown, but just a template that allows you to use similar text format when working on page design.
This template has several 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 |
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 stylename| after {{MdCode| and replace stylename with the name of an existing style.
Example
{{MdCode|Go to [[Main_Page|Main Page]]}}
{{MdCode|outline|Go to [[Main_Page|Main Page]]}}
Preview
Default: Go to Main Page Go to [[Main_Page|Main Page]] Go to
Half-Life: AlyxGo to {{hla|4}}
Desaturated: Go to Main Page Go to [[Main_Page|Main Page]] Go to
Half-Life: AlyxGo to {{hla|4}}
Outline: Go to Main Page Go to [[Main_Page|Main Page]] Go to
Half-Life: AlyxGo to {{hla|4}}