django-wysiwyg icon indicating copy to clipboard operation
django-wysiwyg copied to clipboard

No inline form support

Open majdal opened this issue 14 years ago • 3 comments

Inline TextField don't seem to be supported.

majdal avatar Feb 10 '11 11:02 majdal

Do you mean in the admin tool system?

pydanny avatar May 10 '11 02:05 pydanny

yeah - i could get it to work for regular forms, but not inline forms...

majdal avatar May 10 '11 06:05 majdal

As a temp work around, you can add the css class "ckeditor" to your inlined textareas:

from django import forms
from app.models import Foo

class FooForm(forms.ModelForm):

    description = forms.CharField(widget=forms.Textarea(attrs={'class':'ckeditor'}))

    class Meta:
        model = Media

CKEditor looks for that class out of the box.

And then add form = FooForm to your model admin (don't forget to import FooForm at the top).

That worked for me.

mhulse avatar Sep 18 '11 07:09 mhulse