Django CMS CKeditor

时间:2017-07-28 15:16:18

标签: django ckeditor django-cms

有谁能告诉我如何限制编辑器只允许在CKEditor的Format属性下使用h1和h2:

CKEDITOR_SETTINGS_TITLE = {
    'language': '{{ language }}',
    'toolbar_HTMLField': [
        ['Format']
    ]
}

1 个答案:

答案 0 :(得分:2)

添加format_tags选项以选择CKEditor中可用的格式:

CKEDITOR_SETTINGS_TITLE = {
    'language': '{{ language }}',
    'toolbar_HTMLField': [
        ['Format']
    ],
    'format_tags': 'h1;h2'
}