angular-contenteditable
angular-contenteditable copied to clipboard
Strange effects when copying content of specific elements into contenteditable element
Hi, I'm not sure if this is an issue which is related to the module per se, but it even if not, maybe you have an idea what's going on here.
http://plnkr.co/edit/d0hZx45mvLzn3OCdLg4h?p=preview
Steps:
- select & copy "heading"
- paste it into the contenteditable field
- When you have heading and paste it into contenteditable heading or p, out of nowhere completely new dom nodes are created for each paste element, not inside the contenteditable element, but as siblings to it.
Browser is FF25.
i think this is what you need https://github.com/johnlim5847/angular-contenteditable
// clear paste data element.bind('paste', function(e){ setTimeout(function() { scope.$apply(function() { ngModel.$setViewValue(e.target.innerText); }); element.html(ngModel.$viewValue); }); });