| Author: | clarkmalmgren |
|---|---|
| Official Page: | Go to website |
| Publish Date: | November 11, 2015 |
| License: | MIT |
Description:
An AngularJS directive that allows for click-and-drag or just a click for highlighting words within any container regardless of type. The on-select attribute value is evaluated whenever a word or a group of words have been highlighted. The selection object is passed in as selection in the evaluated component.
Additionally, if auto-highlight is also present, upon selection the selected text is automatically highlighted. This is * effectively the same as calling selection.highlight(..) with some basic defaults.
If snap-to-word is present, the selected text is expanded to include whole words (including punctuation). If snap-to-word is turned on, simply clicking on a word is the same as highlighting the whole word.