• Hi.

    I’m trying to create plugin witch will be adding some script using quicktag.
    Is it possible to add javascript?

    I’m trying to do something like this but when I add “myValue” content with <script> button is not showing

    <script type=”text/javascript”>//<![CDATA[
    var toolbar = document.getElementById(“ed_toolbar”);
    <?php
    edit_insert_button(“Flash”, “wp_slideshow_handler”, “Add slideshow”);
    ?>
    var state_my_button = true

    function wp_slideshow_handler() {
    if (state_my_button) {
    var myXML = prompt(‘add XML name’);
    var myWidth = prompt(‘Width’);
    var myHeight = prompt(‘Height’);
    if (myXML && myWidth && myHeight) {
    myValue = ‘<script src=”/slidshow/swfobject.js” type=”text/javascript”></script><p id=”flashcontent”>Here will be displayed Flash content</p><script type=”text/javascript”> var so = new SWFObject(“/slidshow/slideshow.swf”, “mss”, “‘+myWidth+'”, “‘+myHeight+'”, “8”, “#FFFFFF”); so.addVariable(“dataFile”, “/slidshow/’+myXML+’.xml”); so.write(“flashcontent”); </script>’;
    edInsertContent(edCanvas, myValue);
    }
    }
    }
    //]]></script>
    Any ideas?

The topic ‘Plugin creation’ is closed to new replies.