.shortnameToImage(str)
convert shortnames to images
If you've chosen to unify your inputted text so that it contains only shortnames then this is the function (or its matching PHP function) you will want to use to convert the shortnames images when displaying it to the client.
Feel free to enter other shortnames in the input below to test the conversion process. For a complete list of emoji and their shortnames check out emoji.codes.
Input:
Output:
JS Snippet:
// <input type="button" value="Convert" onclick="convert()"/> <script type="text/javascript"> function convert() { var input = document.getElementById('inputText').value; var output = emojione.shortnameToImage(input); document.getElementById('outputText').innerHTML = output; } </script>