docs: function OnSelectDirective(RangeService) {
      return {
        restrict: 'A',
        scope: false,
        link: function(scope, element, attrs) {
          var options = {
            snapToWord: ('snapToWord' in attrs),
            highlight: ('autoHighlight' in attrs)
          };
  
          element.bind('mouseup', function () {
            if (RangeService.disabled) {
              return;
            }
  
            var selection = RangeService.process(options);
  
            scope.$eval(attrs.onSelect, {
              selection: selection
            });
          });
        }
      };
    }