A repository of over 1000 quality jQuery plugins

jQuery jQuery Textcomplete

jQuery Textcomplete is a jQuery Autocomplete plugin.

Created by Yuku-t

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

Not what you're looking for? Click here to view more Autocomplete jQuery plugins

Autocomplete for Textarea

npm version Bower version Analytics

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

Demo

Demo.

Synopsis

$('textarea').textcomplete([{
    match: /(^|\b)(\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.

Contributors

Patches and code improvements were contributed by:

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



You might also like these other Autocomplete jQuery Plugins

  • Asdfasdf.js

    Auto save data form- The easiest way to not let your user lose their data while filling a form.

  • jQuery Typeahead

    jQuery Typeahead plugin (autocomplete) for search input

  • JQueryTimeAutocomplete

    jQuery autocomplete plugin that works with times. Works basically the same as Google Calendars time input when you add an event. Example:...

License:

The MIT License (MIT)