A user-friendly TinyMCE config When you enable TinyMCE you can either choose theme="simple" or theme="advanced". If you go for the simple you get one lovely little bar of buttons but it's missing the link button which is more important than most other buttons altogether. When you enable "advanced" you get three rows of buttons that makes you dizzy. I mean, should really be editing advanced tables in a WYSIWYG editor or mathematical equations?

Here's a config that I think works great. It's all in one row and it's got the bare minimum in terms of additional plugins (no extra downloads required). It's in Python but translates quite easily into Javascript:


TINYMCE_DEFAULT_CONFIG = {
   'plugins': "fullscreen,paste,autoresize",
   'theme': "advanced",
   'theme_advanced_buttons1' : "bold,italic,strikethrough,bullist,numlist,"\
                               "separator,undo,redo,separator,link,unlink,image"\
                               ",separator,cleanup,code,removeformat,charmap,"\
                               "fullscreen,paste",
   'theme_advanced_buttons2' : "",
   'theme_advanced_buttons3' : "",
}

Comments

Richard Knop

Thanks. This was pretty useful, I was trying to do something similar to this but I was forgetting to set theme_advanced_buttons2 and theme_advanced_buttons3 to "" and there were additional buttons showing.

Uwe

Can anyone explain how to use ztinymce to convert the zope ZMI edit forms to something more user friendly? I'm a bit stuck at the moment as to wether this can be achieved at all.

Thanks, Uwe

Anonymous

Thanks - after a fair bit of googling this was the best answer I found.

Alex Luton

Great Thanks. Helped me with a django app. A really nice, concise set of options

Your email will never ever be published.

Previous:
Funnier than Fail Blog: Fail Dogs September 29, 2009 Misc. links
Next:
Automatically strip whitespace in Django forms October 12, 2009 Django
Related by category:
Fastest way to find out if a file exists in S3 (with boto3) June 16, 2017 Web development
Be very careful with your add_header in Nginx! You might make your site insecure February 11, 2018 Web development
<datalist> looks great on mobile devices August 28, 2020 Web development
How to get all of MDN Web Docs running locally June 9, 2021 Web development
Related by keyword:
EditArea vs. CodePress January 3, 2008 Web development
TinyMCE + Zope = ZTinyMCE June 1, 2006 Zope
WYSIWYG inline HTML editors July 25, 2004 Web development