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.
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.
(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.
no problem Myst1010, glad you like it.
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!
Elisio Leonardo cool glad you like the site and a link back would be fantastic.