Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Mary

    (@marypop)

    Earlier I have used this in functions.php:

    // Customize the format dropdown items
    if( !function_exists('base_custom_mce_format') ){
    	function base_custom_mce_format($init) {
    		// Add block format elements you want to show in dropdown
    		$init['theme_advanced_blockformats'] = 'p,h2,h3';
    		// Add elements not included in standard tinyMCE dropdown p,h1,h2,h3,h4,h5,h6
    		//$init['extended_valid_elements'] = 'code[*]';
    		return $init;
    	}
    	add_filter('tiny_mce_before_init', 'base_custom_mce_format' );
    }

    What can I do now to disable heading 1?

    Plugin Author Andrew Ozz

    (@azaozz)

    Right, the options in the TinyMCE config have changed: http://www.tinymce.com/wiki.php/Configuration. I believe you’re looking for this: http://www.tinymce.com/wiki.php/Configuration:block_formats.

    Thread Starter Mary

    (@marypop)

    Thank for an answet.

    Can you give me a hint were to place this piece of code?
    I tried this in functions.php, but it’s not working at all:

    function myformatTinyMCE($in)
    {
     $in['entity_encoding']= 'block_formats: "Paragraph=p;Header 2=h2;Header 3=h3"'; // numeric/raw
     return $in;
    }
    add_filter('tiny_mce_before_init', 'myformatTinyMCE' );
    Plugin Author Andrew Ozz

    (@azaozz)

    That’s not the right code (copy/paste error?). Perhaps try:

    function myformatTinyMCE($in) {
      $in['block_formats'] = "Paragraph=p;Header 2=h2;Header 3=h3";
      return $in;
    }
    add_filter('tiny_mce_before_init', 'myformatTinyMCE' );
    Thread Starter Mary

    (@marypop)

    Thanks Andrew, it worked perfectly! :)) Wow!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Disable Heading 1’ is closed to new replies.