• I’ve just installed the latest WP, 2.8.4. — The tinymce editor is driving me crazy! I want to be in html mode, edit just raw html, without this crazy editor inserting all these
    and <p> and changing “>” into > and so forth.

    I wind up spending SO much time just trying to work around all this crazy stuff. I don’t have any auto- settings turned on, I’m not going between visual and html mode.

    I saw where there were core file edits to fix this a couple of years ago, but that doesn’t apply now. From posts on the forum, the advanced tinymce plugin seems to cause problems. – I still want the visual editor available for the non-technical staff.

    Does anyone have advice how to deal with this? Anyone have any idea what would happen if I renamed the /js/tinymce directory every time I wanted to edit? (and then renamed back when done.)

    Has anyone hacked the WP tinymce files recently, with success? (i.e., just fixed up html mode, it didn’t mess up anything else)

    Thanks a bunch for any help!! Vicki

Viewing 1 replies (of 1 total)
  • Thread Starter vickilh2

    (@vickilh2)

    I’ve found a workaround for this! I installed the “include-html” plugin … which lets you include a file in a post or page.

    BUT then it didn’t work because this plugin requires that PHP have allow_url_fopen turned on (on my machine, it’s off — good for security reasons.)

    However! I got this to work with allow_url_fopen set to OFF. I edited the /plugins/include-html/include-html.php file. I substituted this:

    $replacement = ‘‘ .
    file_get_contents($URL) .
    ‘‘;

    with this:

    $ch = curl_init();
    $timeout = 5; // set to zero for no timeout
    curl_setopt ($ch, CURLOPT_URL, $URL);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    $file_contents = curl_exec($ch);
    curl_close($ch);
    
    $replacement = ‘‘ .
    $file_contents .
    ‘‘;

    It works!! (some of the quotes above may need changing if you copy/paste.)

    Best, Vicki

Viewing 1 replies (of 1 total)
  • The topic ‘tinymce html editor screws up code’ is closed to new replies.