HTML Kit site requirements.

HTML editor / Support Document
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
 

Support Document

 Home > Support > Support Documents > Preview > How to: Use Preview Plugins
 
 
How to: Use Preview Plugins
The information in this document applies to:
 Summary

This document describes how to use advanced preview options available through preview plugins in HTML-Kit Build 292 and higher.
 
 Details

Starting with HTML-Kit Build 292 and higher, it's possible to modify the behavior of preview windows using plugins. For example, the demoPreviewFTPSvrSide plugin can be used to dynamically and selectively change the URL used by the Preview window to preview remote/FTP files, the hkPreviewPHP plugin can be used to preview PHP scripts without going through a web server, and the hkPreviewRoot plugin can be used to change the web root address used while previewing remote files.

demoPreviewFTPSvrSide

The demoPreviewFTPSvrSide plugin can be used to dynamically and selectively change the URL used by the Preview window to preview remote/FTP files.

How to install the plugin:

  • Download and install the plugin using the "Tools | Install | Install Plugin" main menu option in HTML-Kit Build 292.
     
  • Go to "Edit | Preferences | Preview | Edit Preview Rules."
     
  • Click "Add" under "File extension mappings"
     
  • Enter "asp;aspx" (without quotes) and other file types that you'd like to preview through a web server (local or remote).
     
  • Click "Plugin" and select "demoPreviewFTPSvrSide."
     
  • Click "OK" followed by another "OK."
     
  • Make sure that the "Enable file mappings" option is checked.
     
  • Click "OK."
     

How to use the plugin:

  • Open an *.asp file (or other file type specified above), move the cursor to the bottom of the file (or other place suitable for a comment tag), and click the demoPreviewFTPSvrSide plugin button on the Actions Bar.
     
  • Enter the web root address that should be used to preview the file. Optionally the demoPreviewFTPSvrSide.hks file can be modified to specify the default web root address to be used if the preview-root tag is not found in the file.
     
  • Click the Preview tab in the editor to preview the file using the specified web root address.
     

hkPreviewPHP

Note: This plugin is no longer required to preview PHP pages in the final version of Build 292. It is listed here to demonstrate how to write and use preview plugins. To preview PHP pages in Build 292 using a local copy of the php.exe interpreter, make sure that PHP is properly installed on the system and update the "Edit | Preferences | Actions | PHP Interpreter" path. Open a *.php file and click the Preview tab to test.

The hkPreviewPHP can be used to preview PHP scripts without going through a local or remote web server. It will use a local installation of the PHP interpreter instead of using a web server equipped with a PHP interpreter. Note that php.exe must be in the default PATH, otherwise the hkPreviewPHP.hks file can be modified to specify the full path. Also, PHP scripts being previewed through this plugin must not use features only available on the server, such as database servers and web server environment variables.

How to install the plugin:

  • Download and install the hkPreviewPHP plugin using the "Tools | Install | Plugin" main menu option.
     
  • Go to "Edit | Preferences | Preview | Edit Preview Rules."
     
  • Click "Add" under "File extension mappings"
     
  • Enter "php" (without quotes) or the extension used for PHP files.
     
  • Click "Plugin" and select "hkPreviewPHP."
     
  • Click "OK" followed by another "OK."
     
  • Make sure that the "Enable file mappings" option is checked.
     
  • Click "OK."
     

How to use the plugin:

  • Open a *.php script and click the "Preview" tab in the editor to preview it through the local PHP interpreter.
     

hkPreviewRoot

The hkPreviewRoot plugin can be used to change the web root address used to preview remote documents, so that the preview can use the specified address to locate files with relative paths.

How to install the plugin:

  • Download and install the hkPreviewRoot plugin using the "Tools | Install | Plugin" main menu option.
     
  • Go to "Edit | Preferences | Preview | Edit Preview Rules."
     
  • Click "Add" under "File extension mappings"
     
  • Enter "htm;html" (without quotes) and other file extension(s) used for web documents.
     
  • Click "Plugin" and select "hkPreviewRoot."
     
  • Click "OK" followed by another "OK."
     
  • Make sure that the "Enable file mappings" option is checked.
     
  • Click "OK."
     

How to use the plugin:

  • Open a *.htm file, place the cursor at the bottom of the file, and click the hkPreviewRoot plugin button on the Actions Bar.
     
  • Enter the web root address that should be used to preview the file. Alternatively, the hkPreviewRoot.hks file can be modified to specify the default web root address.
     
  • Click the Preview tab in the editor to preview the file using the specified web root address.
     
 
 References
 
 
 
Document ID: H000142
Reviewed On: 27-Nov-2002
THE INFORMATION IN THIS DOCUMENT IS PROVIDED ON AN AS-IS BASIS WITHOUT WARRANTY OF ANY KIND. PROVIDER SPECIFICALLY DISCLAIMS ANY OTHER WARRANTY, EXPRESS OR IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL PROVIDER BE LIABLE FOR ANY CONSEQUENTIAL, INDIRECT, SPECIAL OR INCIDENTAL DAMAGES, EVEN IF PROVIDER HAS BEEN ADVISED BY "USER" OF THE POSSIBILITY OF SUCH POTENTIAL LOSS OR DAMAGE. "USER" AGREES TO HOLD PROVIDER HARMLESS FROM AND AGAINST ANY AND ALL CLAIMS, LOSSES, LIABILITIES AND EXPENSES.