spantaleev/suggestor.js — pull request #4 by subvertallchris (2014-06-16 20:36:07+00:00)
Title: Append/prepend options and utilize event triggering

This does a couple things:

First, it adds prepend and append options. This is useful if you want to have it insert a string wrapped in a certain way. In my case, I'm using some very basic, simple markup, and I want my users wrapped so they appear as "[@username]":
```javascript
$(this).suggestor({
startDelimiter: "@",
insertKey: 'label',
insertPrepend: '[',
insertAppend: ']',
"suggestionsTemplateHtml": "%label%",
dataSource: dataSource
});
```

The other thing it does is trigger an event, "utilize-mention," when something is selected and inserted into an input field.

```javascript
#stupid basic example
$('#input-field').on('utilize-mention', function(event, data) {
console.log(data);
})
```