WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: TinyMCE Templates] How to move the tinymce template button

[Resolved] [Plugin: TinyMCE Templates] How to move the tinymce template button

  • Currently, the template icon is the very first button (icon) in the first row of the tinymce editor.
    As for my site this button is useful but not very often used, I would like to move it to be the last button (in this first row). How do I do that? Do I need to edit the plugin?
    Thanks for this very useful plugin.

    Samuel

    http://wordpress.org/extend/plugins/tinymce-templates/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Takayuki Miyauchi

    @miyauchi

    HI sambody,

    I am developer of this plugin.
    Thanks for using my plugin. 🙂

    You can customize button layout on “mce_buttons” or “mce_buttons_2” hook like below.

    add_action('mce_buttons', 'my_custom_buttons', 9999);
    function my_custom_buttons($btns){
        array_shift($btns); // remove template button
        array_shift($btns); // remove spacer
        return $btns;
    }
    
    add_action('mce_buttons_2', 'my_custom_buttons_2', 9999);
    function my_custom_buttons_2($btns){
        array_push($btns, 'template'); // add template button at last of 2nd row.
        return $btns;
    }

    That puts the button to the second row, rather than the first.

    But that’s actually fine with me, so I take it as a solution.

    Thanks for that!

    Hi, I recently started using wordpress and the web developer has left me with no training in using wordpress. He has installed TinyMCE advanced editor but I cant seem to move the tool bar away from the body of the text so I can edit the text that goes onto the webpage, please help! Im totally lost 🙁

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] [Plugin: TinyMCE Templates] How to move the tinymce template button’ is closed to new replies.