title: Jquery mention input : output data issue
body: <p>I'm working on my comment system for my website and I am not able to retrieve the value of the whole field.</p>
  
  <p>I am using this script <a href="https://github.com/podio/jquery-mentions-input" rel="nofollow">https://github.com/podio/jquery-mentions-input</a> </p>
  
  <pre><code>return {
    init : function (options) {
      settings = options;
  
      initTextarea();
      initAutocomplete();
      initMentionsOverlay();
    },
  
    val : function (callback) {
      if (!_.isFunction(callback)) {
        return;
      }
  
      var value = mentionsCollection.length ? elmInputBox.data('messageText') : getInputBoxValue();
      callback.call(this, value);
    }
  }
  </code></pre>
  
  <p>The function val is the one returning the value !</p>
  
  <p>This is the code that i'm using to get the value. (it doesn't work)</p>
  
  <pre><code> $('#commentInput').mentionsInput('val', function(comment){ var test = comment; });
       alert( test );
  </code></pre>
  
  <p>I would like to find a way to extract the value comment/test out of this function so it can be then sent to my database.</p>
  
  <p>If I use this next code the alert box displays the good info.</p>
  
  <pre><code>('#commentInput').mentionsInput('val', function(comment) { alert(comment); }); 
  </code></pre>
  
  <p>I tried a few other manipulations to try and make it work, but I was always getting errors like [object Object] or [ HTMLDivElement]</p>
  
  <p>I'm pretty sure it is something stupidly easy, but I cannot figure it out.</p>
  
  <p>Hope someone could help me </p>
  
  <p>Have a good day</p>
  
  <p>Joris </p>