Difference between revisions of "Template:Highlighted/doc"
m |
(Changing category) |
||
Line 19: | Line 19: | ||
*Arguments may contain pairs of double square brackets (for internal links), but it may not contain double right square brackets and then double left square brackets, i.e. <code><nowiki>]][[</nowiki></code>. | *Arguments may contain pairs of double square brackets (for internal links), but it may not contain double right square brackets and then double left square brackets, i.e. <code><nowiki>]][[</nowiki></code>. | ||
− | <includeonly>[[Category: | + | <includeonly>[[Category:Function templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude> |
Revision as of 23:04, 6 October 2023
This is a template for highlighting text. It is packaged to create Template:NeedsTranslating, Template:fact, etc.
Syntax and Usage
Source code: {{highlighted|content=this is the content|background-color=red|content-color=yellow|title=This is the content title text|sup=this is the superscript|sup-color=blue|sup-background-color=#FBFE76|sup-title=this is the superscript title text|attributes=class="noprint"|sup-attributes=class="noprint Template-Fact"}}
Displayed as:
this is the superscriptSource code: {{Highlighted|content=this is the content|content-color=blue}}
Displayed as: this is the content
Explanation
content
is the only required argument. You may omit any of the other arguments.- Ignore
sup
and related arguments if superscripts are not needed. - If the argument contains two right braces (
}}
), you must escape it with<nowiki>
tages, i.e.<nowiki>}}</nowiki>
. - If the argument contains pipe sign (
|
), use{{!}}
to escape it. - Arguments may contain pairs of double square brackets (for internal links), but it may not contain double right square brackets and then double left square brackets, i.e.
]][[
.