WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] TinyMCE script, WP not working anymore (1 post)

  1. Unduro
    Member
    Posted 1 year ago #

    Hello everyone, i wanted to add js to TinyMCE in WP-admin so i put this in my functions.php

    $in['setup'] = <<<JS
    [function(ed) {
               ed.onPreInit.add(function(ed) {
               console.debug('PreInit: ' + ed.id);
               console.debug(ed.initialized);
               var ec = ed.getDoc();
               var head = ec.getElementsByTagName("head")[0];
               var script = ec.createElement("script");
               script.src = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js";
              //script.text  = "alert('voila!');"
               script.setAttribute('type','text/javascript');
               head.appendChild(script);
          });
     }
    ][0]
    JS;

    It's F**** up my site, nothing works anymore, i have removed it ofcourse, but the error is still there.
    "NetworkError: 500 Internal Server Error - "

    Dose anyone have an ideea on how to fix this without reinstalling WP?

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic