- Django HTML Admin Widget
- 3.5.2009
I was a bit annoyed at the lack of WYSIWYG fields for Django's admin interface. I was originally planning to use FCKEditor but couldn't find a polished Django implementation (although I'm sure there is one out there). Instead I opted to use TinyMCE due to this nice Django widget implementation. After running setup.py, installation is a cinch - I just added
from tinymce import models as tinymce_models, and replaced instances ofmodels.TextField()withtinymce_models.HTMLField(). To customize the options available to TinyMCE, I was able to add this to my settings.py:TINYMCE_DEFAULT_CONFIG = { 'theme': "advanced", 'theme_advanced_toolbar_location': "top", 'theme_advanced_toolbar_align': "left", }You can find a complete list of options available to TinyMCE here and a set of buttons included here.
-

Can haz more blogs?
Reply