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