JoyPixels Labs

version 6.6

.toShort(str)

convert native unicode emoji to shortnames

Our recommendation is to unify all user inputted text by converting native unicode emoji, such as those inputted by mobile devices, to their corresponding shortnames. This demo shows you how to use the .toShort(str) Javascript function provided in our toolkit to do just that.

Feel free to enter native unicode emoji in the input below to test the conversion process.

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 = joypixels.toShort(input);
        document.getElementById('outputText').innerHTML = output;
    }
    </script>