Sangeetha.V
Sangeetha.V

Reputation: 115

How to prevent tinymce editor content from users modifying. user should not edit the content. How to do using angularjs

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

Answers (1)

Manube
Manube

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

Related Questions