New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: Return URL of emoji (Twemoji) #51
Comments
There isn’t a direct way to get it, since it’s always dynamic and depends on a few props (emoji.js#L126), but tenically one could: Emoji.defaultProps.backgroundImageFn(
Emoji.defaultProps.set, // apple
Emoji.defaultProps.sheetSize // 64
) That function returns the sheet URL used. EmojiMart uses spritesheets provided by https://github.com/iamcal/emoji-data, so all emojis have the same URL. Is that what you wanted, or were you looking for a distinct URL per emoji to use in a |
Hi @EtienneLem, Thanks for the super fast response! I'm specifically looking for the unique URL's/filenames for the Twemoji set, as the backend I'm integrating with requires the direct URL to the emoji. Looking at I suppose I could find the right image via Thanks again for your time, and hard work! |
I see. What EmojiMart could do is at least return the I would suggest using https://rawgit.com (unless you’re hosting all emoji images yourself?). For example: https://cdn.rawgit.com/iamcal/emoji-data/v2.4.4/img-twitter-64/261d.png or https://cdn.rawgit.com/twitter/twemoji/gh-pages/36x36/261d.png
Would that work for you? |
Yes, that would be perfect! 😍 |
There you go! Available in As a FYI: EmojiMart will return |
Thank you very much, @EtienneLem :) |
Is there a way to get the URL to the image asset from emoji-mart?
Since
onClick
doesn't return it, but perhaps there's a util function I'm not seeing?I'll take a stab at a PR if someone can point me in the right direction.
The text was updated successfully, but these errors were encountered: