Forum closed. New forum available at http://community.wymeditor.org/

Installing Tidy Plugin

Support forum for WYMeditor.

Installing Tidy Plugin

Postby tremmo on Thu Jun 03, 2010 8:44 pm

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?
tremmo
 
Posts: 7
Joined: Fri May 28, 2010 1:40 pm

Re: Installing Tidy Plugin

Postby mr_lundis on Fri Jun 04, 2010 11:14 am

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! ;)
Jonatan Lundin - designer, developer and forum moderator. You should follow me on Twitter!
mr_lundis
 
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden

Re: Installing Tidy Plugin

Postby tremmo on Fri Jun 04, 2010 12:35 pm

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
tremmo
 
Posts: 7
Joined: Fri May 28, 2010 1:40 pm

Re: Installing Tidy Plugin

Postby mr_lundis on Fri Jun 04, 2010 11:00 pm

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! ;)
Jonatan Lundin - designer, developer and forum moderator. You should follow me on Twitter!
mr_lundis
 
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden

Re: Installing Tidy Plugin

Postby tremmo on Sat Jun 05, 2010 10:30 am

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.
tremmo
 
Posts: 7
Joined: Fri May 28, 2010 1:40 pm

Re: Installing Tidy Plugin

Postby mr_lundis on Sat Jun 05, 2010 1:22 pm

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
Jonatan Lundin - designer, developer and forum moderator. You should follow me on Twitter!
mr_lundis
 
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests