veni vidi Scripsi

TinyMCE in one of multiple Textarea fields in Admin

When I was working with Django the other day I had a model which contained 3 textareas (models.TextField()). I only wanted 2 of the 3 to use TinyMCE for mark-up in the Admin. I worked out how to achieve this and here’s a quick guide.

  1. Install TinyMCE as explained in an earlier post.

  2. Make sure the tiny_mce folder, the one you downloaded from tinymce.moxiecode.com, is also in your site-media javascript folder (/[site­me­di­a]/js/tiny_mce/) or change TINYM­CE_JS_URL in your settings.py to the correct folder.

  3. In your settings.py define what you want the default tinymce to look like, for example:

    TINYMCE_DEFAULT_CONFIG = {
         
    continue.