How do I move the toolbar to the top in TinyMCE Simple theme? Thanks
tinyMCE.init({
mode : "textareas",
theme : "simple"
theme_simple_toolbar_location : "top"
});
The important bit is the "toolbar_location" parameter.
The toolbar can only be moved to top when using theme : advanced
in TinyMCE. There is no theme_simple_toolbar_location
but a theme_advanced_toolbar_location
. See documentation here http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/theme_advanced_toolbar_location.
What you can do is to serve the editor as theme : advanced
and then customize the buttons by using the theme_advanced_buttons_1_n
property. It's documented here http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/theme_advanced_buttons_1_n.
Example:
The code in the example is not tested, but it should work. It will show an editor with the buttons for Bold, Italic and Underline at the top.
tinyMCE.init({
mode : "textareas",
theme : "advanced",
theme_advanced_toolbar_location : "top",
theme_advanced_buttons1 : "bold,italic,underline",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : ""
});
So the answer would be: one cannot move the buttons when using theme : simple
.