Custom Tiny MCE button to bring up a custom php popup

This works:

 tinymce.create('tinymce.plugins.tinyplugin', {

        init : function(ed, url){

            ed.addButton('tinyplugin', {
            title : 'map',
                onclick : function() {
                    tb_show("", "../wp-content/plugins/myplugin/test.php?");
                    tinymce.DOM.setStyle(["TB_overlay", "TB_window", "TB_load"], "z-index", "999999")
                },
                image: url + "/icon.png",

            });



        }
    });

The ? after the test.php is important or else the link will be broken.

Leave a Comment