Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jloutsenhizer/emojijs
Emoji rendering for the web
https://github.com/jloutsenhizer/emojijs
Last synced: about 2 months ago
JSON representation
Emoji rendering for the web
- Host: GitHub
- URL: https://github.com/jloutsenhizer/emojijs
- Owner: jloutsenhizer
- License: apache-2.0
- Created: 2013-08-09T22:26:43.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-11-25T13:50:50.000Z (almost 10 years ago)
- Last Synced: 2024-05-22T17:32:17.990Z (4 months ago)
- Language: CSS
- Size: 179 KB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
emojijs
=======Emoji Rendering for the web
emojijs is a javascript library that will allow you to easily render emojis on in your webapp. The emojiset used is the [opensource Twitter emojis](https://blog.twitter.com/2014/open-sourcing-twitter-emoji-for-everyone)
What are Emojis?
---------
[Emoji on Wikipedia](http://en.wikipedia.com/wiki/Emoji)Emojis are emoticons that are commonly used in text messaging. They are encoded as unicode characters that most fonts can't properly render yet. So unless your on an iOS or Android device you likely won't be able to see very many of them if any. With emojijs you can easily replace the emojis with icons that any browser could render.
How to use
------
Add emoji.js and emoji.css to your project and add the following in the `` section of your project:
Later in your javascript code you can use the global emoji object to parse emoji into html
emoji.parseEmoji(emojiString);
emoji.emojify(element);
emoji.emojifyWholePage();
And if you're using jquery then the jquery plugin will load and you can do the following:jQuery("#divWithEmojis").emojify();
This will parse the emojis in all text nodes found inside your selected elements.To emojify the whole page and all changes that happen to it use the following global jQuery function:
jQuery.emojifyWholePage();
This requires [MutationObservers](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) to be supported, you may want to use [this polyfill](https://github.com/Polymer/MutationObservers)