WordPress.org

Ready to get started?Download WordPress

Forums

TinyMCE Templates
[resolved] How to move the tinymce template button (4 posts)

  1. sambody
    Member
    Posted 2 years ago #

    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/

  2. Takayuki Miyauchi
    Member
    Plugin Author

    Posted 2 years ago #

    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;
    }
  3. sambody
    Member
    Posted 2 years ago #

    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!

  4. xaaliyax
    Member
    Posted 1 year ago #

    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 :(

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic