jm-david / emoji-mart-vue

One component to pick them all 👊🏼
https://jm-david.github.io/emoji-mart-vue
BSD 3-Clause "New" or "Revised" License
603 stars 82 forks source link

fallbackEmojiStyles #27

Closed origo27 closed 6 years ago

origo27 commented 6 years ago

Hi, I would like to know if there is any way that I could pull this object when clicking on an emoji in the picker? or how can I add it in the Emoji Object obtained.

screen shot 2018-07-19 at 2 24 11 pm

jm-david commented 6 years ago

Hmm not ideal, but you could access it by rendering the Emoji component and then using a ref prop to access the component instance directly. Is there a reason why you're unable to use the Emoji component to handle the rendering?

origo27 commented 6 years ago

we're trying to convert markdown formatted text containing emoj.colons and inserting emoji component in between the text does not seem possible.

example: " *Hey* rigo :smile: , how are you?" should render as :

<strong>Hey</strong> rigo <img style="display:inline-block;background-image:url(https://a.slack-edge.com/c00d19/img/emoji_2017_12_06/sheet_apple_64_indexed_256.png); background-position:58.8235294117647% 54.90196078431372%; background-size:5200%; width:24px; height:24px" /> , how are you?

jm-david commented 6 years ago

Ahh okay, do you think something like this would work? https://gist.github.com/jm-david/7f98c3ee4fe235c596cff26d7aa26b7b

origo27 commented 6 years ago

does your regex support different skins for emojis like :ok_hand|type_3:? I need this format so that it can be parsed by in our mobile apps as unicode.

jm-david commented 6 years ago

Yep should do! :)

origo27 commented 6 years ago

thanks david! going to try it. I have another question though, for EmojiSearch, the mapping is using the native , how can I replace the display from native to the set sheet? screenshot below:

screen shot 2018-07-26 at 11 43 01 am

jm-david commented 6 years ago

Are you using the Emoji component? Or just outputting the native emoji directly?

origo27 commented 6 years ago

ah yes, i forgot i was displaying the native directly. thanks for the heads up. Using the emoji component now but it seems that it does not render the emoji:

screen shot 2018-07-26 at 1 56 48 pm

however if i tried :santa::skin-tone-3: it displays the correct emoji : screen shot 2018-07-26 at 2 00 01 pm

jm-david commented 6 years ago

Umm not sure sorry, that looks correct to me... 🤔

origo27 commented 6 years ago

nvm, just needed an update. hehe thanks!