Mookai,
I use TinyMCE (http://tinymce.moxiecode.com/). It's not without quirks but
it is useable.
You should include js in your model like that:
class META:
admin = meta.Admin(
... your admin parameters ...
js = (
'/tiny_mce/tiny_mce.js', <-- path to TinyMCE
'/appmedia/admin/js/textareas.js', <-- path to your file
),
)
textareas.js is defined like that:
tinyMCE.init({
mode : "textareas",
theme : "advanced",
//auto_resize : true,
auto_cleanup_word : true,
plugins :
"table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu,fullscreen",
theme_advanced_buttons1_add_before : "save,separator",
theme_advanced_buttons1_add : "fontselect,fontsizeselect",
theme_advanced_buttons2_add :
"separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor",
theme_advanced_buttons2_add_before:
"cut,copy,paste,separator,search,replace,separator",
theme_advanced_buttons3_add_before : "tablecontrols,separator",
theme_advanced_buttons3_add :
"fullscreen,emotions,iespell,flash,advhr,separator,print",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "bottom",
plugin_insertdate_dateFormat : "%m/%d/%Y",
plugin_insertdate_timeFormat : "%H:%M:%S",
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]",
fullscreen_settings : {
theme_advanced_path_location : "top"
}
});
I wanted to convert all textareas using almost all plugins, which didn't
require server part. Your settings could be different --- just follow
TinyMCE's docs.
A small note: I didn't change size of textareas, so after all toolbars I
have a very small window for actual text. I don't mind it because I prefer
to use full screen mode anyway. Sometimes I type text in stand-alone editor
(like Word) and paste it to TinyMCE. But if you want to make it bigger, just
follow http://www.djangoproject.com/documentation/admin_css/ and change the
height of textarea in question.
Thanks,
Eugene
"Mookai" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Hi,
>
> I think it is user friendly to have a wysiwyg editor for large text
> area's in a site. But I could use some pointers if any available how I
> could accomplish this in the auto generated admin pages. I could use a
> filter (markdown, textile), but that isn't close to a wysiwyg editor.
>
> Greetz,
>
>