Using ckEditor on selective text areas in django admin forms

Posted by Rahul on Stack Overflow See other posts from Stack Overflow or by Rahul
Published on 2010-05-27T10:40:25Z Indexed on 2010/05/27 10:51 UTC
Read the original article Hit count: 316

Filed under:
|
|

Hi, I want to apply ckeditor on specific textarea in django admin form not on all the text areas.

Like snippet below will apply ckeditor on every textarea present on django form:

class ProjectAdmin(admin.ModelAdmin):

    formfield_overrides = 
    {models.TextField: {'widget': forms.Textarea(attrs={'class':'ckeditor'})}, }

    class Media:
        js = ('ckeditor/ckeditor.js',)

but i want it on a specific textarea not on every textarea.

© Stack Overflow or respective owner

Related posts about django

Related posts about django-admin