Skip to content
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

Use native emoji code points instead #827

Merged
merged 3 commits into from
Sep 10, 2018
Merged

Use native emoji code points instead #827

merged 3 commits into from
Sep 10, 2018

Conversation

zanechua
Copy link
Contributor

@zanechua zanechua commented Aug 11, 2018

Was trying to implement the emoji plugin, ran into some issues (joypixels/emojify.js#175) and figured implementing native emoji's would probably be better than having to:

  1. Have javascript run to replace the emojis every single time
  2. Use an external library
  3. Use an unmaintained external library
  4. Load external image files for every single emoji

Emoji List is taken from: https://github.com/emojione/emojione/blob/master/emoji.json

I wrote a small nodejs script to retrieve all the emoji code points sans the skin color versions as not all OSes have support for that. Would you like this script? Should probably be added into the build process somewhere to automate it.

@Alex-D
Copy link
Owner

Alex-D commented Aug 11, 2018

Would you like this script? Should probably be added into the build process somewhere to automate it.

Yep :)

Can you update the related documentation and demo?

Here:
https://github.com/Alex-D/Trumbowyg/blob/develop/docs/demos/plugins/emoji.html

And here:
https://github.com/Alex-D/Trumbowyg/blob/develop/docs/documentation/plugins/index.html#L219-L266

Thank you :)

@zanechua
Copy link
Contributor Author

Done.

@zanechua
Copy link
Contributor Author

The script to download the file and output to html codepoints is below.

I added the current set of html code points that are being used here.

https://gist.github.com/zanechua/b22559644391f76f276f0a3d4d6e946b

@dmyers
Copy link

dmyers commented Sep 9, 2018

Native emojis would be amazing! I also had a hard time getting the emoji plugin to work with emojify.js and finally did by copying all the files from the demo since somehow getting the latest versions from all libraries was not working at all. Once I got it setup, I just am not as fond of it since users can't copy between apps like messages into the editor and have it work since this implementation is png based instead of utf codes.

@dmyers
Copy link

dmyers commented Sep 9, 2018

Have you by chance seen Emoji Mart or EmojioneArea? It looks pretty neat and supports native too. Someone made these using EmojiOne Area https://jsfiddle.net/riyaz_ali/5Lhex13n and https://jsfiddle.net/mervick/1v03Lqnu/765/. What was interesting to me is that they use PNGs to render and if you copy they actually use the native code point, but to be honest after doing a lot of research I'm more confused about emojis than when I started. 😆

https://missive.github.io/emoji-mart/
https://github.com/mervick/emojionearea

@zanechua
Copy link
Contributor Author

zanechua commented Sep 9, 2018

I haven't seen those before. Just wanted to do a quick replacement of the old emojify.js as that was giving me lots of issues. But I have taken a quick peek at the links that you have posted and those seem quite cool.

But have you tried my PR though? It is native emoji code points.

@dmyers
Copy link

dmyers commented Sep 10, 2018

I just tried it now. It works good and I like it too. I think that's a good solution for me at least.

@Alex-D Alex-D merged commit 7bb18c8 into Alex-D:develop Sep 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants