I want TinyMCE applied on a TextArea when user role is admin otherwise show normal TextArea.
How do I do that?
Is there TinyMCE server side command for that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can check the current user’s membership in a role and then enable TinyMCE for a given textarea with this sort of approach:
You may also want to do the role check in your controller and pass the value as part of a ViewModel or the ViewBag.