                 # remove emoji suggestion wrapper each time
                 if document.querySelectorAll('.emoji-sugg-container').length
                     document.querySelectorAll('.emoji-sugg-container')[0].parentNode.removeChild(document.querySelectorAll('.emoji-sugg-container')[0])
-                console.log(models.viewstate.suggestEmoji);
                 if element.value.length && models.viewstate.suggestEmoji
                     index = 0;
                     # read emoji table

                return originalText.substr(0, originalText.lastIndexOf(':')) + newEmoji;
            e.preventDefault();
            document.getElementById('message-input').value = newText(document.getElementById('message-input').value.trim())


).bind(this))

clearsImagePreview = ->

                unicodeMap = require '../emojishortcode';
                emojiSuggListIndex = -1;
                if e.keyCode == 32
                    # Converts emojicodes (e.g. :smile:, :-) ) to unicode
                    if models.viewstate.convertEmoji
                        # get cursor position
