Adding the TinyMCE header plugin

Last updated on
30 April 2025

Formating controls for headings (h1, h2, h3...) are not included in the base TinyMCE package. However there is a 3rd Party TinyMCE plugin that provides this.

  1. Download the plugin from SourceForge.
  2. Unzip the files and place header directory in your modules/tinymce/tinymce/jscripts/tiny_mce/plugins folder.
  3. The TinyMCE Drupal module handles plugins differently than stock TinyMCE, hence the standard plugin installation instructions do not apply. Instead edit the modules/tinymce/plugin_reg.php file and add the following lines immediately before return $plugins;
    
    $plugins['heading'] = array();
    $plugins['heading']['theme_advanced_buttons1'] = array('h1,h2,h3,h4,h5,h6,separator');
    $plugins['heading']['heading_clear_tag'] = array('p');
    
    
  4. on the TinyMCE settings page you should now see a button entry for the headings: "h1,h2,h3,h4,h5,h6,separator – heading". Enable the button.

That's it, you should now see buttons for headings in your editor.

Drupal 6

As of Jan 2009, All you need to do is enable "HTML block format" if using the latest dev for 6.x

Help improve this page

Page status: Not set

You can: