friendica_2021.01_tupambae_.../view/js/jquery-textcomplete
2019-02-12 11:29:50 +01:00
..
CHANGELOG.md Move js/ folder under view/ 2018-01-28 16:17:36 -05:00
jquery.textcomplete.css Move js/ folder under view/ 2018-01-28 16:17:36 -05:00
jquery.textcomplete.js tagged the JS files in view/js with their licenses 2019-02-12 11:29:50 +01:00
jquery.textcomplete.min.js tagged the JS files in view/js with their licenses 2019-02-12 11:29:50 +01:00
jquery.textcomplete.min.map Move js/ folder under view/ 2018-01-28 16:17:36 -05:00
LICENSE Move js/ folder under view/ 2018-01-28 16:17:36 -05:00
README.md Move js/ folder under view/ 2018-01-28 16:17:36 -05:00

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