Template:MdCode/doc: Difference between revisions
mNo edit summary |
m (→Preview) |
||
| Line 38: | Line 38: | ||
== Preview == | == Preview == | ||
<div style="background: #262626; border-radius: 3px; user-select: none; pointer-events: none; padding: 1px 8px;"> | <div style="background: #262626; border-radius: 3px; user-select: none; pointer-events: none; padding: 1px 8px;"> | ||
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>}} | {| | ||
|- | |||
Desaturated: {{MdCode|desaturated|Go to [[Main_Page|Main Page]]}} {{MdCode|desaturated|<nowiki>Go to [[Main_Page|Main Page]]</nowiki>}} {{MdCode|desaturated|Go to {{hla|4}}}} {{MdCode|desaturated|<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>}} | ||
|- | |||
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>}} | |Desaturated: || {{MdCode|desaturated|Go to [[Main_Page|Main Page]]}} {{MdCode|desaturated|<nowiki>Go to [[Main_Page|Main Page]]</nowiki>}} {{MdCode|desaturated|Go to {{hla|4}}}} {{MdCode|desaturated|<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> | </div> | ||
Revision as of 05:21, 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 Go to {{hla|4}}
|
| Desaturated: | Go to Main Page Go to [[Main_Page|Main Page]] Go to Go to {{hla|4}}
|
| Outline: | Go to Main Page Go to [[Main_Page|Main Page]] Go to Go to {{hla|4}}
|