Template:Twemoji/doc: Difference between revisions

From Irony Wiki
Jump to navigation Jump to search
template data
No edit summary
Line 4: Line 4:


== Usage ==
== Usage ==
<code>&#123;{Twemoji|''codepoint''}}</code>
<code>&#123;{Twemoji|''codepoint''|''title (optional)''|''size (optional)''}}</code>


To specify what emoji to render, you will have to enter the Unicode codepoint of the emoji. Yeah, I wish you could just type the emoji too, but I don't know how to make that work without it either slowing down the wiki or being massively time-consuming for me to do.
To specify what emoji to render, you will have to enter the Unicode codepoint of the emoji. Yeah, I wish you could just type the emoji too, but I don't know how to make that work without it either slowing down the wiki or being massively time-consuming for me to do.
Line 30: Line 30:
"type": "string",
"type": "string",
"required": true
"required": true
},
"2": {
"label": "Title",
"description": "What will show up when you hover over the emote",
"example": ":smiling_imp:",
"type": "string",
"suggested": true
},
"3": {
"label": "Size",
"description": "The size of the emote",
"type": "string",
"default": "20px"
}
}
},
},

Revision as of 08:20, 2 December 2020

smiling imp

This template will render an emoji from the Twemoji project, which is what Discord uses to render its emojis.

Usage

{{Twemoji|codepoint|title (optional)|size (optional)}}

To specify what emoji to render, you will have to enter the Unicode codepoint of the emoji. Yeah, I wish you could just type the emoji too, but I don't know how to make that work without it either slowing down the wiki or being massively time-consuming for me to do.

So, to find the codepoint of the emoji you want, you can go to Emojipedia and enter your emoji into the search bar. Once you're at the page for your emoji, scroll down until you find the "Codepoints" section. There, it should say something like "U+1F608". That "1F608" is the codepoint you need. Do not include "U+" in the template. You will need to convert any capital letters to lowercase letters too; so it would be "1f608" instead of "1F608", otherwise it won't work.

So, to render :smiling_imp: (😈) with this template, you would do:

{{Twemoji|1f608}} which outputs

If your emoji has two codepoints, such as for a flag or emoji with skin tone, put a hyphen between the two codepoints.

For example, to render the nigga santa emoji (🎅🏿) with this template, you would do:

{{Twemoji|1f385-1f3ff}} which outputs

Template data

This template will render an emoji from the Twemoji project, which is what Discord uses to render its emojis.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Emoji codepoint1

The Unicode codepoint of the emoji you would like to render. For a detailed explanation, see the template documentation [[Template:Twemoji]]

Example
1f608
Stringrequired
Title2

What will show up when you hover over the emote

Example
:smiling_imp:
Stringsuggested
Size3

The size of the emote

Default
20px
Stringoptional