Posts Tagged ‘tiny mce’

How to make TinyMCE in Drupal put icons all on one row

Wednesday, August 29th, 2007

How do I stop the TinyMCE WYSIWYG editor Drupal module from using two rows of icons in the toolbar? Here’s how to configure the plugin so that it puts all the icons into one row…

Overview: The TinyMCE Drupal module separates the toolbar icons into sensible groups, but if you only want a few icons in the TinyMCE toolbar, it doesn’t make sense to have them span two rows.

To change the default toolbar in the Drupal TinyMCE editor to a single line is easy. Your version might look different, but essentially you need to load all of the icons into the array that represents the first line of the toolbar.

1. Open [drupal root]/modules/tinymce/plugin_reg.php.

Change the code from this:


$plugins['default']['theme_advanced_buttons1'] = array(’bold’, ‘italic’, ‘underline’, ’strikethrough’, ‘justifyleft’, ‘justifycenter’, ‘justifyright’, ‘justifyfull’, ‘bullist’, ‘numlist’, ‘outdent’, ‘indent’, ‘undo’, ‘redo’, ‘link’, ‘unlink’, ‘anchor’);
$plugins['default']['theme_advanced_buttons2'] = array(’image’, ‘cleanup’, ‘forecolor’, ‘backcolor’, ’sup’, ’sub’, ‘code’, ‘hr’);
$plugins['default']['theme_advanced_buttons3'] = array(’cut’, ‘copy’, ‘paste’, ‘visualaid’, ‘removeformat’, ‘charmap’, ‘help’);

to this:


$plugins['default']['theme_advanced_buttons1'] = array(’bold’, ‘italic’, ‘underline’, ’strikethrough’, ‘justifyleft’, ‘justifycenter’, ‘justifyright’, ‘justifyfull’, ‘bullist’, ‘numlist’, ‘outdent’, ‘indent’, ‘undo’, ‘redo’, ‘link’, ‘unlink’, ‘anchor’, ‘image’, ‘cleanup’, ‘forecolor’, ‘backcolor’, ’sup’, ’sub’, ‘code’, ‘hr’, ‘cut’, ‘copy’, ‘paste’, ‘visualaid’, ‘removeformat’, ‘charmap’, ‘help’);