Skip to content

Introduce autocompleting power to textareas, like GitHub comment forms have.

License

Notifications You must be signed in to change notification settings

make/jquery-textcomplete

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Autocomplete for Textarea

Bower version Analytics

Introduces autocompleting power to textareas, like a GitHub comment form has.

Demo

Demo.

Synopsis

$('textarea').textcomplete([{
    match: /(^|\s)(\w{2,})$/,
    search: function (term, callback) {
        var words = ['google', 'facebook', 'github', 'microsoft', 'yahoo'];
        callback($.map(words, function (word) {
            return word.indexOf(term) === 0 ? word : null;
        }));
    },
    replace: function (word) {
        return word + ' ';
    }
}]);

Dependencies

  • jQuery (>= 1.7.0) OR Zepto (>= 1.0)

Documents

See doc dir.

License

Licensed under the MIT License.

Credits

Contributors

Patches and code improvements were contributed by:

https://github.com/yuku-t/jquery-textcomplete/graphs/contributors

About

Introduce autocompleting power to textareas, like GitHub comment forms have.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.3%
  • CSS 0.7%