Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Need TinyMCE Button Created With Options WordPress


I need a TinyMCE Button created with a popup options window which inserts predefined text into the editor window. The button must also only on a specific custom post type page.

Here's the way it would work...

1.) User Clicks The Button
2.) Dialog Window Pops Up
3.) User Selects Category of Sample Text
4.) User then selects the sample text they want to see.
5.) Once they've selected the sample text, it shows in a preview below.
6.) if they like what they see, they can now modify the text in the preview box and then click insert.
7.) The text will now be put into editor at the place the cursor previously was.

That's it.

Please see the attached image as a guideline.

Answers (3)


Christianto answers:


could you post html/css/php code that create the structure that already done?


Armand Morin comments:

The image I have displayed is just a graphic I made up to show an example of how the button should work.

Christianto comments:


try my script attached..

place "t-sample" folder to your theme directory and include it on your functions.php

include ( TEMPLATEPATH. '/t-sample/tinyMCE_category.php');

On tinyMCE_category.php there are array to put your category and text, change it according to your need..