title: Ionic: Disallow all emoticons
body: <p>I want to disallow all emoticons in my text inputs and textareas.</p>
  
  <p>Currently at every input the whole text will be checked, and if there is an emoticon, a notification is displayed that they are not allowed.</p>
  
  <p>How can I achieve, that just the last character will be checked (instead of the whole text, I think this is better perfomance-wise), and if this char is an emoticon, it will not be displayed (blocked)? Furthermore, my current regex just disallows some emoticons (just the special ones, like Eyes or Shoes), not all of them (e.g. the normal Smiley, or Tongue-Smiley). How can I block them all?</p>
  
  <p>My code so far (HTML):</p>
  
  <pre><code>&lt;textarea ng-model="postcard.textBack" id="message-textarea" no-emoticons&gt;&lt;/textarea&gt;
  </code></pre>
  
  <p>Ionic</p>
  
  <pre><code>app.directive('noEmoticons', function ($timeout) {
    return function (scope, element, attrs) {
      var emoticonDetected;
      element.bind("keydown", function (event) {
        var text = $('#message-textarea').val();
        if(text.match(/([\uE000-\uF8FF]|\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDDFF])/g, '')){
          emoticonDetected = true;
        } else {
          emoticonDetected = false;
        }
        scope.$emit('clicked-from-directive-emoticon', {emoticonDetected});
      });
    };
  });
  </code></pre>