a project inspired by the Twitter/X Twemoji project โ https://github.com/twitter/twemoji โ but for the Apple Emoji set instead
You may include Apmoji.js from the jsDelivr CDN, or you may alternatively host it locally by hosting the dist/apmoji-vX.Y.min.js
file on your server and embedding it onto your application from there.
To include Apmoji.js from jsDelivr, append the following line inside your <head></head>
tag:
<script src="https://cdn.jsdelivr.net/gh/oddmario/apmoji.js/dist/apmoji-v1.2.min.js"></script>
You can then start making your web pages look prettier using the main function of Apmoji.js, apmoji.parse()
:
apmoji.parse(document.body) // finds any emojis inside the DOM body and converts them to Apple emojis
apmoji.parse(document.querySelector("#mycooldiv")) // finds any emojis inside the #mycooldiv DOM element and converts them to Apple emojis
Or alternatively:
You can apply the apmoji
class on any element that contains an emoji. It will use the Apple emojis font as long as Apmoji.js has been initialised using apmoji.init()
at least once.
<script>
apmoji.init();
</script>
<span class="apmoji">๐ฅธ</span>
- Code licensed under the MIT License: https://opensource.org/licenses/MIT
- Emoji CDN provided by https://github.com/benborgers/emojicdn