[Django]-Django CKEditor different toolbar settings for django admin

2👍

Yes, you can. Reference here.

In settings.py:

CKEDITOR_CONFIGS = {
    'default': {
        'toolbar': 'Custom',
        'toolbar_Custom': 
            ['Format', 'Bold', 'Italic', 'Link', 'NumberedList', 'BulletedList', 'Table', 'HorizontalRule', 'Image', 'Youtube', 'Smiley',
             'Undo', 'Redo', 'Preview', 'Source'],
    },
    'non_admin':{
        'toolbar': 'Custom',
        'toolbar_Custom': 
            ['Format', 'Bold', 'Italic', 'Link', 'Undo', 'Redo'],
    },
}

and in models.py:

content = RichTextField(config_name='non_admin')

Leave a comment