Facing issue with the textAngular editor when user copy and paste text. (clip board contains text and image)
You can find library from here https://github.com/fraywing/textAngular.
Checkout this fiddle. It uses ta-past directive of textAngular and replaces all image elements by using regex .replace(/<img[^>]*>/g,"");
on your input string.
<div ng-app="test">
<div ng-controller="testController">
<div text-angular
name="testEditor"
ng-model="htmlContent"
ta-paste="stripFormat($html)"></div>
</div>
</div>
angular.module('test', ['textAngular'])
.controller('testController', function($scope, $timeout, textAngularManager, $filter) {
$scope.htmlContent = '<p>Hello There!</p>';
$scope.stripFormat = function ($html) {
return $html.replace(/<img[^>]*>/g,"");
};
});