Alter wysiwyg in RichText

41 views
Skip to first unread message

dobrysmak

unread,
Apr 24, 2012, 10:13:42 AM4/24/12
to django-...@googlegroups.com
Hi, i'm stuck with wysiwyg in RawText widget . Cant get this to work.

I'm trying to integrate cleditor with RawText widget in admin. Have prepared the model with form + widget but it does not work correct.
The problem is that i cant click on the the textarea to write something, the html is just <body></body> inside iframe of the wysiwyg. The same with django-tinymce.

Default RichText work's great but i cant change the language and buttons. 
How can i fix this?

Cheers!   

Matthias Kestenholz

unread,
Apr 25, 2012, 2:34:53 AM4/25/12
to django-...@googlegroups.com

This sounds as if only the rich text editor HTML has been copied
without any JS behavior whatsoever. This happens when the empty form
(formset.empty_form) is initialized with a rich text widget. TinyMCE
and CKEditor (and other probably too) don't like it when they are
copied around, that's the reason for the richify/poorify methods to
exist in the first place.

I'd try coping either init_tinymce.html or init_ckeditor.html (in
feincms/templates/admin/content/richtext/) and starting from there.

Additionally, you'll have to set custom values for
FEINCMS_RICHTEXT_INIT_TEMPLATE and FEINCMS_RICHTEXT_INIT_CONTEXT. The
template would be 'admin/content/richtext/init_cleditor.html', the
context a dict of whatever context variables you need inside
init_cleditor.html (if any).

http://www.feinheit.ch/media/labs/feincms/contenttypes.html#module-feincms.content.richtext.models


Hope it helps,
Matthias

Reply all
Reply to author
Forward
0 new messages