node-emoji
node-emoji copied to clipboard
Custom emoji
Many icons are missing in the project. To add you need to follow these instructions.
How to understand what is encrypted here?
"0023-fe0f-20e3":[["\u0023\uFE0F\u20E3","\u0023\u20E3"],"\uE210","\uDBBA\uDC2C",["hash"],0,0,15,0],
I know that version 2 is planned, but now I need this library to work.
How do you encrypt these characters? Can you show one example?
garlic 🧄 moon_cake 🥮 salt 🧂 avocado 🥑 birthday cake 🎂 bagel 🍩 beverage_box 🧃 ice_cube 🧊 falafel 🧆 waffle 🧇 leafy_green 🥬 mate_drink 🧉 cupcake 🧁 butter 🧈 onion 🧅
@gHashTag The "encrypted" values are actually hexadecimal numbers, each of which is assigned to a unicode value. For example, the unicode value of a
is \u0061
. Here's the full table.
@Richienb Let's say I want to add leafy_green 🥬 Its Unicode u1F96C How to add it to lib / emojifile.js file There, besides him, is full of other attributes, where can I get them?
"0023-fe0f-20e3":[["\u0023\uFE0F\u20E3","\u0023\u20E3"],"\uE210","\uDBBA\uDC2C",["hash"],0,0,15,0],
How to do it right?
function convert(emojiString, alias) {
let key = 'custom'
let value = ''
for (let i = 0; i < emojiString.length; i++) {
const code = emojiString[i].codePointAt(0).toString(16).padStart(4, 0)
key += '-' + code
value += '\\u' + code.toUpperCase()
}
console.log(`"${key}":[["${value}"],"","",["${alias}"]],`)
}
convert('🥬', 'leafy_green')
Hi i am getting :waving_black_flag: when i add flag-england(🏴) or flag-scotland(🏴) or flag-wales(🏴) when i unemojify. so again when i do emojify that :waving_black_flag: string, i am getting following output: OUTPUT: 🏴?????????????????????????.
Why 🏴 🏴 flags are not decoded even if their codes are mentioned in emojifile.js?
👋 Closing out this old issue now that the v2 is released (#113). If anybody still has a desire to add in custom emojis, please do file a new issue explaining why.
Note that we're also working on bumping to v3 of emojilib (#129).