【发布时间】:2014-03-29 10:18:33
【问题描述】:
当我使用 ckeditor 在 django admin 中创建帖子时,它会是一篇好看的帖子。但是当我需要编辑它时,我会在所见即所得模式下看到所有 html 标签和样式(所有源代码)。
当我写信时:
“保存并继续编辑”后
我在模型中使用 RichTextField。
附言django-ckeditor-从 PyPI 更新
也许我的配置有问题?
CKEDITOR_CONFIGS = {
'default': {
'toolbar': 'UltraFull',
'height': 300,
'toolbar_UltraFull': [
['Font', 'FontSize', 'Format'],
['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat'],
[
'NumberedList', 'BulletedList', '-',
'Outdent', 'Indent', '-',
'Blockquote', '-',
'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'
],
['Link', 'Unlink', 'Anchor'],
['Image', 'Flash', 'Table', 'HorizontalRule', 'PageBreak', 'Smiley', 'SpecialChar'],
['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'],
['TextColor', 'BGColor'],
['Maximize', 'Source'],
],
'language': 'ru',
'forcePasteAsPlainText': True,
},
}
【问题讨论】:
标签: django django-admin ckeditor django-ckeditor