Pianoc
Pianoc

Reputation: 797

Django CMS CKeditor

Can anyone tell me how I restrict the editor to only allow h1 and h2 under the Format attribute in the CKEditor:

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

Upvotes: 0

Views: 163

Answers (1)

mch
mch

Reputation: 1279

Add the format_tags option to select the formats available in CKEditor:

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

Upvotes: 2

Related Questions