有谁能告诉我如何限制编辑器只允许在CKEditor的Format属性下使用h1和h2:
CKEDITOR_SETTINGS_TITLE = {
'language': '{{ language }}',
'toolbar_HTMLField': [
['Format']
]
}
答案 0 :(得分:2)
添加format_tags
选项以选择CKEditor中可用的格式:
CKEDITOR_SETTINGS_TITLE = {
'language': '{{ language }}',
'toolbar_HTMLField': [
['Format']
],
'format_tags': 'h1;h2'
}