Code

Changes between Version 1 and Version 2 of CookBookAdminTools


Ignore:
Timestamp:
09/25/05 11:37:42 (9 years ago)
Author:
eugene@…
Comment:

new TinyMCE doesn't flicker, new config file gives more place for text

Legend:

Unmodified
Added
Removed
Modified
  • CookBookAdminTools

    v1 v2  
    1919        mode : "textareas", 
    2020        theme : "advanced", 
    21         //auto_resize : true, 
     21        content_css : "/appmedia/blog/style.css", 
     22        theme_advanced_toolbar_location : "top", 
     23        theme_advanced_toolbar_align : "left", 
     24        theme_advanced_buttons1 : "fullscreen,separator,preview,separator,bold,italic,underline,strikethrough,separator,bullist,numlist,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,separator,image,cleanup,help,separator,code", 
     25        theme_advanced_buttons2 : "", 
     26        theme_advanced_buttons3 : "", 
    2227        auto_cleanup_word : true, 
    2328        plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu,fullscreen", 
    24         theme_advanced_buttons1_add_before : "save,separator", 
    25         theme_advanced_buttons1_add : "fontselect,fontsizeselect", 
    26         theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor", 
    27         theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator", 
    28         theme_advanced_buttons3_add_before : "tablecontrols,separator", 
    29         theme_advanced_buttons3_add : "fullscreen,emotions,iespell,flash,advhr,separator,print", 
    30         theme_advanced_toolbar_location : "top", 
    31         theme_advanced_toolbar_align : "left", 
    32         theme_advanced_path_location : "bottom", 
    3329        plugin_insertdate_dateFormat : "%m/%d/%Y", 
    3430        plugin_insertdate_timeFormat : "%H:%M:%S", 
    3531        extended_valid_elements : "a[name|href|target=_blank|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]", 
    3632        fullscreen_settings : { 
    37                 theme_advanced_path_location : "top" 
     33                theme_advanced_path_location : "top", 
     34                theme_advanced_buttons1 : "fullscreen,separator,preview,separator,cut,copy,paste,separator,undo,redo,separator,search,replace,separator,code,separator,cleanup,separator,bold,italic,underline,strikethrough,separator,forecolor,backcolor,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,help", 
     35                theme_advanced_buttons2 : "removeformat,styleselect,formatselect,fontselect,fontsizeselect,separator,bullist,numlist,outdent,indent,separator,link,unlink,anchor", 
     36                theme_advanced_buttons3 : "sub,sup,separator,image,insertdate,inserttime,separator,tablecontrols,separator,hr,advhr,visualaid,separator,charmap,emotions,iespell,flash,separator,print" 
    3837        } 
    3938}); 
    4039}}} 
    4140 
    42 I use advanced theme, and practically all standard plugins, which don't require server support. Mode "textareas" instructs TinyMCE to convert '''all''' textareas to WYSIWYG editors. You can look up all options in [http://tinymce.moxiecode.com/tinymce/docs/index.html TinyMCE Documentation]. 
     41Mode "textareas" instructs TinyMCE to convert '''all''' textareas to WYSIWYG editors. I use the advanced theme, and practically all standard plugins, which don't require server support. In inline mode you have minimalistic toolbar with the most essential tools. When you switch to full-screen mode (tool's icon looks like a monitor), you have practically all tools available for advanced editing. You can look up all options in [http://tinymce.moxiecode.com/tinymce/docs/index.html TinyMCE Documentation]. 
    4342 
    44433. Add '''js''' option to admin sections of your model (excerpt from my model): 
     
    6261That's it. 
    6362 
    64 Notes: 
    65  
    66  * TinyMCE toolbars will occupy almost all area of textarea. I don't mind, because when I want to edit text, I use full screen mode. It's a button on toolbar looking like a monitor. 
    67  * If you want to make more room for editing, you can do two things: 
    68    * Make textareas bigger: use CSS. See [http://www.djangoproject.com/documentation/admin_css/ Customizing the Django admin interface] for details. Hint: textareas have ids. 
    69    * Use [http://tinymce.moxiecode.com/tinymce/docs/option_auto_resize.html experimental auto-resize mode]. I don't use it now because it produced annoying flickering. 
    70  * Toolbars flicker when you move cursor (backspace, left/right arrows, and so on). Strange but useable. 
    71  * I wish I could have specify different set of tools for inline and full screen modes. It may be possible, but I didn't research it yet. 
    72  
    7363Hints: 
    7464