HTMl Tidy configuration txt file -- what is it for?

Help with setting up and configuring custom user tools in UltraEdit (based on command line input)

HTMl Tidy configuration txt file -- what is it for?

Postby bellafortuni » Sun Mar 19, 2006 12:35 am

Does it have a purpose? If one isn't selected, Tidy fails. If I just make an empty text file someplace and select it, Tidy runs fine, but what is the point of the exercise? It's still empty when I'm done. The Help file is less than illuminating on the subject.
User avatar
bellafortuni
Basic User
Basic User
 
Posts: 10
Joined: Tue Aug 10, 2004 11:00 pm

Re: HTMl Tidy configuration txt file -- what is it for?

Postby Mofi » Sun Mar 19, 2006 2:52 pm

Since v8.00 UltraEdit supports HTML Tidy. Till v11.00 of UltraEdit the Tidy options could be only set by creating a Tidy config file manually and also manually adding this config file to following entry in the uedit32.ini (example):

[Settings]
Html Tidy Config File=C:\Programs\UltraEd\Config\Htmltidy.cfg


I have for example following settings in this file:

doctype: auto
tidy-mark: no
wrap: 125
quiet: yes


This HTML Tidy support uses the DLL Htmltidy.dll which must be downloaded from WWW and copied by the user itself to the program directory of UltraEdit. Since v11.00 of UltraEdit this HTML Tidy support is not present anymore in a menu, but can still be used with a hotkey which must be assigned to command FormatHtmlTidy in the key mapping configuration dialog.


At v11.00 of UltraEdit IDM has improved the HTML Tidy support. Now HTML Tidy is installed and updated with an UltraEdit install/update because the code is now in the DLL tidylib.dll in the UltraEdit program directory and this DLL is also in the UE install setup package.

This second HTML Tidy support is executed by clicking on menu item Run HTML Tidy at menu Format - HTML Validation or the appropriate toolbar button.

Since v11.00 you can set many, but not all options of HTML Tidy directly with UltraEdit in a dialog and these options are saved in uedit32.ini at section [HTMLTidyOptions].

These Tidy options are used during Tidy execution if you do not specify a Tidy configuration file. If you specify a Tidy configuration file in the dialog, the Tidy options in the uedit32.ini are ignored and the options in the configuration file are used. (I think so, because I have not really tested it.)

With such a configuration file you can specify ALL Tidy options. For example the quiet option from my example above is not available in the Tidy options dialog of UltraEdit. If you specify a Tidy configuration dialog in the Tidy dialog this specification is saved in the uedit32.ini as follows:

[HTMLTidy]
ConfigName=C:\Programs\UltraEd\Config\Newtidy.cfg


A second advantage of using a Tidy config file is that you can create several config files with different settings. Then you can easily switch to a different set of Tidy options by simply selecting an other config file.


If you have UltraEdit v11.00 or higher you can choose between the "old" Tidy support with the Htmltidy.dll or the "new" one with the Tidy dialog and the Tidylib.dll. You can also use both simultaneously.


For details about the Tidy config file read as help of UltraEdit already suggests the HTML Tidy Quick Reference and also the full HTML Tidy Manual.


Edited on 2006-10-29: With UltraEdit v12.20 and UEStudio v6.00 the key mapping configuration dialog has bee modified to support multi-key assignments (chords). On first start of UE/UES after an upgrade the existing *.kbd file is converted to an equivalent *.uek file.

In the new key mapping configuration dialog the command FormatHtmlTidy is not associated anymore internally to the HTML Tidy support with Htmltidy.dll. It's now assigned to the new HTML Tidy command available also in the Format menu.

An existing key assignment in the *.kbd file for the support for Htmltidy.dll is nevertheless still working in the converted *.uek file because it is still assigned to internal command ID named ID_HTMLTIDY. So be careful if you want to use still the first method like I. Do not destroy your converted *.uek file or reassign the hotkey for ID_HTMLTIDY by mistake to a different command.

I have sent a request email to IDM that the developers should add a command with small description for ID_HTMLTIDY so users like I who want to continue to use the Htmltidy.dll version can assign a hotkey for the command in the new key mapping configuration dialog.

Edited on 2007-06-13: And IDM meets my wish and implemented the command RunHTMLTidy in the key mapping configuration dialog of UltraEdit v13.10 and UEStudio v6.30 to be able to assign a hotkey to fast execute HTML Tidy with Htmltidy.dll as I still like it. Thanks IDM!
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4069
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: HTMl Tidy configuration txt file -- what is it for?

Postby bellafortuni » Sun Mar 19, 2006 3:32 pm

Thank you for the patient reply.
User avatar
bellafortuni
Basic User
Basic User
 
Posts: 10
Joined: Tue Aug 10, 2004 11:00 pm

Re: HTMl Tidy configuration txt file -- what is it for?

Postby jacobjmorris » Sat Jun 10, 2006 6:26 pm

Where do I actually download the configuration file. I went to the HTML website, but it was a bit confusing.
User avatar
jacobjmorris
Newbie
 
Posts: 1
Joined: Fri May 12, 2006 11:00 pm

Re: HTMl Tidy configuration txt file -- what is it for?

Postby Mofi » Sun Jun 11, 2006 11:05 am

You can't download a HTMLTidy configuration file. You have to create it manually with a text editor like UltraEdit. The HTML documentation only describes which settings are possible in this configuration file and what affect they have. It is a documentation and not a config file. HTMLTidy has no GUI where you can click on configuration options and the appropriate actions are done to save it in a text file (INI file) like a Windows GUI application normally does. You must enter character for character in the configuration file manually as in old DOS days.

At http://www.w3.org/People/Raggett/tidy/ you can see a sample config file which maybe can help you to start.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4069
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna


Return to Custom User Tools/Tool Configuration