2

There is an option in CONFIG:

CKEDITOR_CONFIGS = {
    'default': {
        'skin': 'moono',
        # 'skin': 'office2013',
        ...

But actually I can't even switch to office2013 theme, I am getting white block only.

Is there any way to enable other themes?

4

2 回答 2

2

第一级:必须下载office2013主题的CkEditor。

第二级:

模型.py

class Post(models.Model):
    title = models.CharField(max_length=500, verbose_name=_('Title'), blank=True)
    message = models.TextField(max_length=50000, verbose_name=_('Message'), blank=True)

管理员.py

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

    class Media:
        js = ('ckeditor/ckeditor.js',) # The , at the end of this list IS important.
        css = {
            'all': ('ckeditor/contents.css',)
        }

admin.site.register(Post, PostModelAdmin)
于 2015-10-17T16:39:28.810 回答
2

django-ckeditor 仅附带 moono 皮肤。您需要下载所需的皮肤,并将其放在静态目录中:

%STATIC_DIR%/ckeditor/ckeditor/skins/

于 2015-10-17T17:35:41.197 回答