Friday, 23 August 2013

Customize ckeditor in django admin form

Customize ckeditor in django admin form

I need configure custom params (toolbars, width and height) of ckeditor
for only one field in my AdminForm
class BlogAdminForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(BlogAdminForm, self).__init__(*args, **kwargs)
self.fields['description'].widget = CKEditor(attrs={'cols': 100,
'rows': 25})
How to set specific parameters of ckeditor (such as «toolbarGroups»,
«width», «height» etc) for only this field?

No comments:

Post a Comment