htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Add-Ons: Re: [DarrylB] Has anyone gotten HTML Tidy to work on IIS?: Edit Log



whazup
New User

Feb 3, 2005, 10:50 AM


Views: 83681
Re: [DarrylB] Has anyone gotten HTML Tidy to work on IIS?

Yeah, I got it working here. I copied tidy.exe into the same folder as the plugin code, then changed html-tidy-logic.php as follows:


Code
        $source = stripslashes($source); 

// Open a tidy process - I hope it's installed!
$descriptorspec = array(
0 => array("pipe", "r"),
1 => array("pipe", "w"),
- 2 => array("file", "/dev/null", "a")
+ 2 => array("file", "null", "w")
);
- $process = proc_open("tidy -config html-tidy-config.cfg", $descriptorspec, $pipes);
+ $process = proc_open("\"" . getcwd() . "/tidy\"", $descriptorspec, $pipes);
+ // -config html-tidy-config.cfg

// Make sure the program started and we got the hooks...
// Either way, get some source code into $source
@@ -56,7 +57,7 @@

// Create a set of javascript code to compile a new source string
foreach ($srcLines as $line) {
- $jsMakeSrc .= "\tns += '" . str_replace("'","\'",$line) . "\\n';\n";
+ $jsMakeSrc .= "\tns += '" . str_replace("'","\'",trim($line)) . "\\n';\n";
}
?>


I believe that's all I did.

Mark Bradshaw
http://www.dream3.org/

(This post was edited by whazup on Feb 7, 2005, 7:10 AM)


Edit Log:
Post edited by whazup (New User) on Feb 3, 2005, 11:02 AM
Post edited by whazup (New User) on Feb 3, 2005, 11:03 AM
Post edited by whazup (New User) on Feb 3, 2005, 11:05 AM
Post edited by whazup (New User) on Feb 7, 2005, 7:10 AM


Search for (options)