When I allow TinyMCE to show the default advanced profile the buttons on the editor toolbar correctly wrap to three lines and appear within the width of my editor area. However when I choose a custom set of buttons from the TinyMCE settings they do not wrap and the editor appears much wider than the area it is in (which causes it to be partially hidden). How can I get the buttons on a custom editor layout to wrap correctly?
Comments
Comment #1
ausvalue commentedIn the file:
..../modules/tinymce/plugin_reg.php
You will find lines of code which have the following format:
$plugins[xxxx']['theme_advanced_buttons2'] = array('xxxx');
The name of each (xxxx in above) should tell you what button it is referring to.
The 2 in theme_advanced_buttons2 specifies that the button will be in row 2 of the buttons. You can change this to 1, 3 or 4 etc. Yes, you can add an extra row if you want. I haven't tried adding a 5th or 6th row but it certainly worked for 4 rows. The order/position within the file specifies where in the row the button will be.
After doing the above you should be able to see the button in the buttons and plugins section within the edit tinymce profile within your administration profile.
->Administer->Site configuration->TinyMCE->edit(of profile)->Buttons and Plugins
I am not sure how much of the following needs to be done to get the changes through
perform browser refresh/Disable page cache in Performance section/run update.php/run cron/ etc
When it becomes visable in the Buttons and Plugins section the administration panel you then enable it there and you should be able to see it in your editor (maybe more refresh needed first)
I also suggest that you add the following code to the plugin_reg.php file:
$plugins['media'] = array();
$plugins['media']['theme_advanced_buttons2'] = array('media');
$plugins['media']['extended_valid_elements'] = array('img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|obj|param|embed]');
This adds the media plugin which replaces the old flash plugin. Current downloads from Moxiecode have the media plugin code in their plugin directory but the this Drupal code hasn't added it in yet.
I had no problems changing button positions with Version 5 but with version 6 Drupal it doesn't always work as expected. In Version 6 there seems to be some problem that stops buttons being placed into or out of rows 1 and 2 but row 3 buttons can be changed to row4 or something like that. I need to further investigate to be able to state full characteristics.
Regards
Ken
Comment #2
mupsi