Template:Twemoji/doc: Difference between revisions
No edit summary |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Lua|Twemoji}} | |||
[[File:Twemoji12 1f608.svg|thumb|right|150px|smiling imp]] | [[File:Twemoji12 1f608.svg|thumb|right|150px|smiling imp]] | ||
Line 4: | Line 5: | ||
== Usage == | == Usage == | ||
<code>{{Twemoji|'' | <code>{{Twemoji|''emoji''|''title (optional)''|''size (optional, default 20px)''}}</code> | ||
To specify what emoji to render, | === Simple example === | ||
To specify what emoji to render, simply enter the emoji in the first parameter. | |||
So, to | So, to render <nowiki>:smiling_imp:</nowiki> (😈) with this template, you would do: | ||
So, to render <nowiki>: | <code>{{Twemoji|😈}}</code> which outputs {{Twemoji|😈}} | ||
=== Full example === | |||
The second and third parameters are completely optional. | |||
The second parameter can be used to specify a tooltip that will show up when you hover over the emoji. | |||
The third parameter is meant to allow you to override the size of the emoji. Default is "20px". It can also be used to provide [[mediawikiwiki:Help:Images#Rendering a single image|any other image options]]. | |||
So, to render <nowiki>:cold_face:</nowiki> (🥶) with a tooltip of "NIGAR BOOTY CHEEKS" at a size of 30px, you would do: | |||
<code>{{Twemoji|🥶|NIGAR BOOTY CHEEKS|30px}}</code> which outputs {{Twemoji|🥶|NIGAR BOOTY CHEEKS|30px}} | |||
=== Limitations === | |||
Do not put multiple emojis into the same template. If you wanted to render "{{Twemoji|😂}}{{Twemoji|😂}}{{Twemoji|😂}}", <code>{{Twemoji|😂😂😂}}</code> would not work, you would have to do <code>{{Twemoji|😂}}{{Twemoji|😂}}{{Twemoji|😂}}</code>. | |||
Unicode 13 emojis are currently not supported. | |||
== Legacy usage == | |||
Previously, you had to specify the Unicode codepoint for the emoji you wanted to render. | |||
For example, to render <nowiki>:exploding_head:</nowiki> (🤯), you had to do: | |||
<code>{{Twemoji|1f92f}}</code> which outputs {{Twemoji|1f92f}} | |||
This is no longer required, but is still supported. | |||
== Template data == | == Template data == | ||
Line 25: | Line 44: | ||
"params": { | "params": { | ||
"1": { | "1": { | ||
"label": "Emoji | "label": "Emoji", | ||
"description": "The | "description": "The emoji you would like to render. Only use 1 emoji.", | ||
"example": " | "example": "😈", | ||
"type": "string", | "type": "string", | ||
"required": true | "required": true |