Reputation: 115
I want to prevent my data in tinymce editor. Should not allow to edit the content. How to do this in angularjs. Thanks in advance. For example. I want provide contenteditable false dynamically. How to provide this. Please help
Upvotes: 0
Views: 100
Reputation: 5242
Is this what you are asking:
<div ng-if="!contentIsEditable"><textarea></textarea></div>
<div ng-if="contentIsEditable"><mce-directive></mce-directive></div>
And in the controller:
$scope.contentIsEditable=($scope.userType==="editor")?true:false;
Upvotes: 1