mirror of
https://github.com/friendica/friendica
synced 2025-04-26 11:50:11 +00:00
rework autocomplete: update jquery.textcomplete to v1.3.3
This commit is contained in:
parent
cc7d1d453b
commit
46f5fc0a09
7 changed files with 671 additions and 73 deletions
54
library/jquery-textcomplete/README.md
Normal file
54
library/jquery-textcomplete/README.md
Normal file
|
@ -0,0 +1,54 @@
|
|||
Autocomplete for Textarea
|
||||
=========================
|
||||
|
||||
[](http://badge.fury.io/js/jquery-textcomplete)
|
||||
[](http://badge.fury.io/bo/jquery-textcomplete)
|
||||
[](https://github.com/igrigorik/ga-beacon)
|
||||
|
||||
Introduces autocompleting power to textareas, like a GitHub comment form has.
|
||||
|
||||

|
||||
|
||||
[Demo](http://yuku-t.com/jquery-textcomplete/).
|
||||
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
```js
|
||||
$('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](https://github.com/yuku-t/jquery-textcomplete/tree/master/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
|
Loading…
Add table
Add a link
Reference in a new issue