WordPress.org

Support

Support » Plugins and Hacks » Hacks » Want to add new custom button in wordpress editor toolbar

Want to add new custom button in wordpress editor toolbar

  • I am trying to create a new plugin for wordpress.

    At a very high level my requirement is

    1 Add a custom button ( let’s call it MyButton) in tinyMCE editor toolbar.
    2 Click on the button should open a new popup div/window.

    I tried this code,But unable to add my custom button.

    function add_more_buttons($buttons) {
      $buttons[] = 'hr';
      $buttons[] = 'del';
      $buttons[] = 'cut';
      $buttons[] = 'sup';
      $buttons[] = 'MyButton'; // Want to add my custom button
     return $buttons;
    }
    add_filter("mce_buttons_2", "add_more_buttons");

    Anyone having any idea???

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Want to add new custom button in wordpress editor toolbar’ is closed to new replies.