An autocompletion library to autocomplete mentions, smileys etc. just like on Github!
At.js now depends on Caret.js.
Please read CHANGELOG.md for more details if you are going to update to new version.
http://ichord.github.com/At.js
https://github.com/ichord/At.js/wiki
textarea
- Chrome, Safari, Firefox, IE7+ (maybe IE6)contentEditable
- Chrome, Safari, Firefox, IE9+
- Support IE 7+ for textarea.
- Supports HTML5 contentEditable elements (NOT including IE 8)
- Can listen to any character and not just '@'. Can set up multiple listeners for different characters with different behavior and data
- Listener events can be bound to multiple inputors.
- Format returned data using templates
- Keyboard controls in addition to mouse
Tab
orEnter
keys select the valueUp
andDown
navigate between values (andCtrl-P
andCtrl-N
also)Right
andleft
will re-search the keyword.
- Custom data handlers and template renderers using a group of configurable callbacks
- Supports AMD
- jQuery >= 1.7.0.
- Caret.js
(You can use
Component
orBower
to install it.)
Simply include the following files in your HTML and you are good to go.
<link href="css/jquery.atwho.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery.js"></script>
<script src="js/jquery.caret.js"></script>
<script src="js/jquery.atwho.js"></script>
$('#inputor').atwho({
at: "@",
data:['Peter', 'Tom', 'Anne']
})
For installing using Bower you can use jquery.atwho
and for Component please use ichord/At.js
.
You can include At.js in your Rails
application using the gem jquery-atwho-rails.
- @ichord (twitter)
- reverted #423 because it doesn't work with Froala Editor
- added methods
getDataFor
andgetDataForCurrentlySelected
toController
class (used in the next point) - added method
getSelectedOption
to the plugin API in order to be able to get model data for currently selected option in dropdown - fixed range errors in
EditableController.prototype._setRange
by ensuring the node is still available in the document - allowed to block adding any value into the document if
beforeInsert
callback explicitly returnsnull
- fixed
Api.run
method that was causing errors because it expected an event to be passed