有誰知道如何獲得在django-ckeditor配置設置中工作的advancedContentFilter?我試圖過濾粘貼在P標籤刪除樣式屬性。我使用settings.py中的以下內容,但它似乎沒有註冊。Django CKEditor允許內容
CKEDITOR_CONFIGS = {
'allowedContent':'p',
}
有誰知道如何獲得在django-ckeditor配置設置中工作的advancedContentFilter?我試圖過濾粘貼在P標籤刪除樣式屬性。我使用settings.py中的以下內容,但它似乎沒有註冊。Django CKEditor允許內容
CKEDITOR_CONFIGS = {
'allowedContent':'p',
}
您是否嘗試刪除stylesheetparser
插件?
https://github.com/shaunsephton/django-ckeditor#if-you-want-to-use-allowedcontent
CKEDITOR_CONFIGS是CONFIGS的字典,而不是一個配置詞典:d試:
CKEDITOR_CONFIGS = {
'default': {
'allowedContent':'p',
},
}
這對我的作品
CKEDITOR_CONFIGS = {
'default': {
'removePlugins': 'stylesheetparser',
'allowedContent': True,
},
}
另外...如果你想關閉ckeditor的高級內容過濾器,您可以在settings.py文件中設置'allowedContent':True。 ckeditor文檔有更多關於其設置的信息:http://docs.ckeditor.com/#!/guide/dev_acf –