2014-03-03 208 views
2

有誰知道如何獲得在django-ckeditor配置設置中工作的advancedContentFilter?我試圖過濾粘貼在P標籤刪除樣式屬性。我使用settings.py中的以下內容,但它似乎沒有註冊。Django CKEditor允許內容

CKEDITOR_CONFIGS = { 
    'allowedContent':'p', 
} 

回答

1

CKEDITOR_CONFIGS是CONFIGS的字典,而不是一個配置詞典:d試:

CKEDITOR_CONFIGS = { 
    'default': { 
     'allowedContent':'p', 
    }, 
} 
+1

另外...如果你想關閉ckeditor的高級內容過濾器,您可以在settings.py文件中設置'allowedContent':True。 ckeditor文檔有更多關於其設置的信息:http://docs.ckeditor.com/#!/guide/dev_acf –

1

這對我的作品

CKEDITOR_CONFIGS = { 
    'default': { 
    'removePlugins': 'stylesheetparser', 
    'allowedContent': True, 
    }, 
}