<text-angular name="myEditor" class="deal-notes" ta-
toolbar-class="btn-toolbar pull-right" ng-model-options="{ debounce: 500}"
ng-change="updateDeal('deal.notes');" ng-blur="makeLinks()" ta-toolbar-
group-class="btn-group" ta-toolbar="[['bold','italics', 'insertLink']]" ng-
model="deal.notes">
My goal is to add hyperlinks to the content using ng-change
, but whenever a user pastes a URL, the cursor jumps to the beginning.
<script>
function makeLinks(){
var linkedText = Autolinker.link($scope.deal.notes, {stripPrefix: false});
$scope.deal.notes = linkedText;
updateDeal('deal.notes');
}
</script>