Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do disable options from the Format menu in CKeditor?

In the Format select box, you can choose Heading 1, Heading 2 etc

How can I disable some of those options? Is it also possible to rename them? I want to only allow Heading 2 and Heading 3, and if possible, rename them to Heading and Sub-Heading.

I figured out how to rename them - in the language file. I edited the 'en-au.js' and then set { language: 'en-au' } but it hasn't seem to have worked.

like image 842
alex Avatar asked Feb 03 '10 05:02

alex


2 Answers

Okay, so I changed the titles under en.js, and to disable the other formats, I used this format_tags: 'p;h3;h4' in the config.

like image 123
alex Avatar answered Nov 18 '22 15:11

alex


If you're using Drupal, how I ended up disabling some of the formatting options from the drop-down list was Configuration > Content Authoring > CKEditor > select profile that you want to edit > expand Advanced Options > in Custom JavaScript configuration section, add the tags you would like to have appear in your drop-down list. So, if you only need a p, h2, and h3, you would add the following script:

config.format_tags = 'p;h2;h3';

I referred to the following CKEDITOR page for syntax: http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-format_tags

Hope this helps someone

like image 2
ForTheWin Avatar answered Nov 18 '22 16:11

ForTheWin