Page 1 of 1

Installing Tidy Plugin

PostPosted: Thu Jun 03, 2010 8:44 pm
by tremmo
Is there an example of how to install the tidy plugin?

I found some snippets here and there but I don't have the full picture. Did I miss some document somewhere? If I did, could you point me to it?

I added:

Code: Select all
         var wymtidy = wym.tidy();
        wymtidy.init();

to

Code: Select all
postInit: function(wym) {

I have:

Code: Select all
  <script type="text/javascript" src="_lib/jquery.js"></script>
  <script type="text/javascript" src="jquery.jstree.min.js"></script>
  <script type="text/javascript" src="_lib/wymeditor/jquery.wymeditor.min.js"></script>
  <script type="text/javascript" src="_lib/wymeditor/plugins/tidy/jquery.wymeditor.tidy.js"></script>
  <script type="text/javascript" src="notree.js"></script>

I notice there's a spot in my tool menu that is a link, when I mouse over it it turns yellow, however there is no icon. Do I have to add the icon manually? How would I do that?

Re: Installing Tidy Plugin

PostPosted: Fri Jun 04, 2010 11:14 am
by mr_lundis
Hi!
The Tidy plugin is indeed poorly documented, but as far as I can tell you're initializing it properly. The issue with the missing icon is fixed in 0.5-rc2, so updating will fix that.

Cheers! ;)

Re: Installing Tidy Plugin

PostPosted: Fri Jun 04, 2010 12:35 pm
by tremmo
Appreciate the help

Installed rc2, the icon appears but now I get this:

Fatal error: Class 'tidy' not found in C:\Documents and Settings\jim\Desktop\notree\microapache\wwwroot\notree\_lib\wymeditor\plugins\tidy\tidy.php on line 26

Re: Installing Tidy Plugin

PostPosted: Fri Jun 04, 2010 11:00 pm
by mr_lundis
I forgot to mention that you'll need to have the actual Tidy module/library installed on your server, otherwise it wont work. But why are you interested in using Tidy anyway? The html generated by WYMeditor should be fine, if not then there is a bug.

Cheers! ;)

Re: Installing Tidy Plugin

PostPosted: Sat Jun 05, 2010 10:30 am
by tremmo
It's running on an windows apache web server.
.
I thought it might format the html to make it more readable, adding line breaks, indentation, etc.

Re: Installing Tidy Plugin

PostPosted: Sat Jun 05, 2010 1:22 pm
by mr_lundis
Here you go:
If you are using PHP on a Windows system, all you need to do to enable the extension is uncomment the line extension=php_tidy.dll in your php.ini file. The official win32 binary distribution has built-in Tidy support.


http://devzone.zend.com/article/761