ivirabyan / jquery-mentions

Adds mentioning support to your text fields.
http://ivirabyan.github.io/jquery-mentions/
MIT License
114 stars 49 forks source link

Added new function setValue #6

Closed pergardebrink closed 9 years ago

pergardebrink commented 9 years ago

This was I function that I needed in order to set the value after it had been initialized. Maybe it could be useful for others as well? I'm new to GitHub so I apologize if I'm doing this pull request wrong.. ;)

$('.mentions').mentionsInput('setValue', 'Hey @[alex](user:1)');

I also fixed a bug in the init function that checks if it's an INPUT, TEXTAREA element

pergardebrink commented 9 years ago

Oh, no, sorry... found a bug. Creating a new pull request soon!