HTML Kit site requirements.

HTML editor / FAQ
HomeHTML-Kit downloadsAdd-ins that update and extend HTML-Kit's capabilitiesSoftware and authoring support channelsRegister -- download add-ons and support HTML-KitOnline tools for HTML-Kit users
  Translations of this page: in het Nederlands

FAQ

 Home > Support > Frequently Asked Questions > HTML Tidy > Is there a wa...
 
 

Is there a way to invoke HTML Tidy with a config file using a keyboard shortcut?

 Tidy config shortcut
The default settings used by the HTML Tidy plugin can be modified by going to "Edit | Preferences | Tidy" from the main menu. However, in some cases it may be easier to use a custom configuration file instead of changing the default settings.
 
Method #1: As of the July 2004 version of the HTML Tidy plugin, it is possible to set up a default Tidy config file as follows: simply save the Tidy configuration to a file named default.htc in the HTML-Kit\Data\Default folder.
 
Method #2: The "Run with custom config file" option on the Tidy drop-down menu (or the "Actions | Tools | HTML Tidy | Run with custom config file" main menu option) can be used to run HTML Tidy with a custom configuration. The number of steps required to run Tidy with a custom configuration can be reduced by creating a keyboard shortcut.
 
The following steps can be used to assign the "Actions | Tools | HTML Tidy | Run with custom config file" action to a keyboard shortcut such as "Shift+F9".
  • Select "Tools | Customize | Customize Keyboard Shortcuts" from the main menu.
     
  • Click the "Add" button.
     
  • Press a key (such as "Shift+F9") or pick a key from the drop-down menu under the "Shortcut Key" field.
     
  • Click the "Action" radio button.
     
  • Select "Tools > HTML Tidy" from the drop-down list.
     
  • Select "Run with custom config file" from the second drop-down list below it.
     
  • Click the "Add" button.
     
  • Click the "OK" button to close the "Shortcut Key" dialog.
     
  • Click the "OK" button to close the "Keyboard Shortcuts" customization dialog.
Pressing "Shift+F9" (or the assigned keyboard shortcut) will now invoke the "Actions | Tools | HTML Tidy | Run with custom config file" action.
 
Once a custom config file (*.htc or *.cfg file) is selected for the first time, HTML-Kit will remember it between sessions.
 
A custom config file can be created using the "Save Config" button under "Edit | Preferences | Tidy".
 
To manually create a config file, save the Tidy parameters to a text file with a *.htc or *.cfg file extension. For example, to create a config file with insturctions for indenting tags and content (similar to enabling the Indent content switch on the "Tidy" preferences tab), save the following line to a file named MyTidyConfig.htc and select it while invoking Tidy.
 
      indent: yes