Tuesday, April 10, 2012

How to include TinyMCE editor in ASP.NET MVC 3 razor view?

- Download the latest version from: http://www.tinymce.com/download/download.php
- Extract JavaScript folder into a folder under Scripts, and include files into MVC project
- Copy and Paste following code into the view you want to use

<script type="text/javascript" src='@Url.Content("~/Scripts/tiny_mce/tiny_mce.js")'></script>
<script type="text/javascript">
    tinyMCE.init({
        mode: "textareas"
    });
</script>
<form method="post" action="somepage">
<textarea name="content" style="width: 100%"></textarea>
</form>


- Most important thing: double check the path (JavaScript file tiny_mce.js) is correct
References for HTML editor:
HTML eidtor:
http://ckeditor.com/demo
http://www.tinymce.com/tryit/full.php
http://drupal.fckeditor.net/demo
http://www.webdesignerdepot.com/2008/12/20-excellent-free-rich-text-editors/
http://blogs.planetcloud.co.uk/mygreatdiscovery/post/Using-CKEditor-and-TinyMCE-with-ASPNET-MVC.aspx

Request Validation with ASP.NET 4.5 : A deep dive

http://brijbhushan.net/2012/04/03/request-validation-with-asp-net-4-5-a-deep-dive/

ASP.NET page life cycle

ASP.NET + IIS + DNS Records = Sub Domain on the fly

http://www.dotnetexpertguide.com/2012/04/aspnet-iis-dns-records-sub-domain-on.html

Burnout is caused by resentment

 must-haves to prevent me burning out are:
  • Exercising 2 - 3 times a week
  • Eating well (fruits and veggies)
  • 8 hours of sleep at least 4 nights a week
  • Unplugging totally for at least a week a year