Share
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 inherit the
DataTypeAttribute:You can even add validation in to this attribute if for example you want to prevent certain HTML tags so you can avoid XSS attacks or something.
As stated in another answer, you then simply add an editor template for RichText.cshtml or RichText.ascx in the View\Shared\EditorTemplates folder and in the view where you are showing the property use:
In your editor template is where you would add your code to create a
TextArea(or however you are invoking TinyMCE) and then you can register some script in your master page to attach TinyMCE to whatever tag your editor template outputs.