Django CKEditor AllowedContent

sir*_*ine 4 django ckeditor

有谁知道如何让 advancedContentFilter 在 django-ckeditor 配置设置中工作?我试图过滤粘贴在 p 标签中以删除样式属性。我在 settings.py 中使用了以下内容,但它似乎没有注册。

CKEDITOR_CONFIGS = {
    'allowedContent':'p',
}
Run Code Online (Sandbox Code Playgroud)

小智 6

这对我有用

CKEDITOR_CONFIGS = {
  'default': {
    'removePlugins': 'stylesheetparser',
    'allowedContent': True,
  },
}
Run Code Online (Sandbox Code Playgroud)