WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to add a button the the WordPress editor's toolbar. When clicked, I want to open a modal dialog (exactly like what you get when you click the "Paste from Word" icon).

This might be more than one question, so the first question I have is what code to I need to add to my theme's functions.php to place the button with a click event that opens a modal window similar to the Word dialog?

share|improve this question
A search would have yielded several similar questions. – t31os Jul 3 '11 at 9:58
up vote 1 down vote accepted

Here is a nice tutorial I've read http://www.garyc40.com/2010/03/how-to-make-shortcodes-user-friendly/ He as a great example and you cal also download the source files and get a better understanding

That's how I added a custom button to the tinymce editor in my plugin simple TOC which you can also download , look at the code and get an even better understanding.

share|improve this answer

i followed this tutorial: http://www.ilovecolors.com.ar/tinymce-plugin-wordpress/ also has sample code.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.