Drupal TinyMCE module: rearrange the toolbar buttons

If you want to change the default appearance of the toolbar buttons for the TinyMCE module, follow these simple steps:

  • Open the tinymce.module file with your preferred editor.
  • Locate the following line (which is currently line number 620): $init['theme_advanced_buttons3'] = array();
  • Directly below this line is the code you'll need to edit; add the names (refer to the buttons you've enabled when configuring the TinyMCE buttons and plug-ins).
  • Save and reload: the icons should appear in the order you've specified.

For example, this is how I modified the array:

$row[] = array( array('newdocument', 'save'), array('bold', 'italic', 'underline','strikethrough'), array('sub','sup'), array('undo', 'redo'), array('cut', 'copy', 'paste', 'pasteword'), array('link', 'unlink','anchor'), array('image', 'charmap'), array('code') ,array('formatselect', 'fontselect', 'fontsizeselect','styleselect'), array('justifyleft', 'justifycenter', 'justifyright', 'justifyfull'), array('numlist', 'bullist', 'indent', 'outdent') );

If you've written a better array, let us know!