In my webpage we'll only allow users to use H3
and H4
, but it's confusing to see these as "Title 3" and "Title 4". I wanted to rename these as "Title" and "Subtitle", but setting format_h3.name
doesn't seem to affect that.
I can't write custom JS to configure the editor as I'm using a Django Plugin, that actually converts a python dictionary into the final JSON config used.
The relevant part of what I tried is as follows:
CKEDITOR_CONFIGS = {
'default': {
'allowedContent': 'h3 h4 p b i u a[*]',
'format_p': {'name': 'Standard text', 'element': 'p'},
'format_h3': {'name': 'Title', 'element': 'h3'},
'format_h4': {'name': 'Subtitle', 'element': 'h4'},
'toolbar': [
{'name': 'styles', 'items': ['Format']},
{'name': 'basicstyles', 'items': ['Bold', 'Italic', 'Underline', '-', 'RemoveFormat']},
{'name': 'links', 'items': ['Link', 'Unlink']},
]
}
}