X

How to Add Cut, Copy and Paste Buttons to the TinyMCE Editor

Snippets by IsItWP

Are you looking for a way to enable 3 new buttons within the TinyMCE editor including cut, copy, and paste? While there’s probably a plugin for this, we have created a quick code snippet that you can use to add cut, copy, and paste buttins to the TinyMCE editor in WordPress.

Instructions:

All you have to do is add this code to your theme’s functions.php file or in a site-specific plugin:

function enable_more_buttons($buttons) {
  $buttons[] = 'copy';
  $buttons[] = 'cut';
  $buttons[] = 'paste';
 return $buttons;
}

add_filter("mce_buttons_2", "enable_more_buttons");

You can also use this snippet to get the required results.

function enable_more_buttons($buttons) {
  $buttons[] = 'copy,cut,paste';
 return $buttons;
}

add_filter("mce_buttons_2", "enable_more_buttons");

Note: If this is your first time adding code snippets in WordPress, then please refer to our guide on how to properly copy / paste code snippets in WordPress, so you don’t accidentally break your site.

If you liked this code snippet, please consider checking out our other articles on the site like: 18 best WordPress comments plugins and how to set up Shopify with WordPress.

Comments   Leave a Reply

  1. Thanks for sharing this information, I have added this code to my theme’s functions.php file but personally I feel the functionality of the buttons are not working properly. It worked for the first time and stopped working after a few minutes. I don’t know this is happening with me only.

    Now I am using the PasteItCleaned plugin and it’s affordable and helped me to add the data from my excel sheets.

  2. (Translated by program)
    These buttons I did not know, great functionality.
    And thanks for mentioning my suggestion.
    His tricks are great and I wish much success to your blog.

    1. no problem Myst1010, glad you like it.

  3. Elisio Leonardo March 20, 2011 at 7:01 pm

    Hi Kevin, your snippets are really knows and i will love to show it to my users…

    I will always put a link to the original source:this blog!

    1. Elisio Leonardo cool glad you like the site and a link back would be fantastic.

Add a Comment Cancel reply

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!