JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app ng-controller="formCtrl">
<textarea ng-model="description" id="description"></textarea>
<br />
vidTags: {{vidTags}}
<br />
desc: {{desc}}
<br />
</div>
CSS
#description {
width: 300px;
height: 3em;
}
.hashtag {
color: blue;
}
JavaScript
function formCtrl($scope){
$scope.$watch(function() {
$scope.description = "Wow, it's crazy over here! #baltimore #riots";
$scope.vidTags = $scope.description.match(/(^|\s)(#[a-z\d-]+)/ig);
$scope.desc = $scope.description.replace(/(^|\s)(#[a-z\d-]+)/ig, "$1<span class='hashtag'>$2</span>");
})
}