有谁知道如何获得在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 –