HTML Markup | JavaScript | Java | Computer Sci | Home & Links

TextPad - A User's Guide

TextPad is a text editor with many features not found in basic editors such as NotePad. For example some hard to live without functions that are standard in TextPad are:

  • spell checking
  • importing of files
  • multiple file edits
  • template and macro (ie tag) generation
  • browser previewing from within editor
  • cursor position indicator (line and row number)

This short user's guide includes the following topics:

Installing the Editor

  1. Download textpad.exe from the TextPad homepage.
  2. Start the installation by double clicking on TextPad.exe
  3. Accept all the defaults offered by the installer.
  4. At the last screen, uncheck the box that asks whether you wish to view the readme file.
  5. If you missed the last step just close the file and the editor.

Installing the [X]HTML/CSS Clip Library

Clip libraries are sets of macro templates that save keystrokes when doing repetitive tasks such as tagging up HTML documents or creating CSS style files. I have created an open source, license free, custom library for valid [x]html and CSS tags for webpage authoring.

  1. Download J. Russell's HTML4/CSS/XHTML clip library installer.
  2. Start installing by double clicking on the file macro.exe.
  3. Accept all defaults while installing.

The TextPad editor and the clip library for [X]HTML4/CSS tagging has now been installed. You can run TextPad by selecting Start-Programs-TextPad. You may want to create or drag-and-drop a shortcut onto the desktop for easy access to the editor.

NOTE: Many other clip libraries that have been customized to specific tasks and languages can be obtained from TextPad ShareWare.

Using the TextPad Clips (aka macros)

To use the custom clips, you must first open the clipboard by selecting Tools-Clip Library (or ctrl-F5). Next make sure that the correct library is selected. For the basic HTML tags select HTML4 Tags(1). For more advanced HTML macros select HTML4 Tags(2). XHTML Tags(3) and XHTML Tags(4) contain parallel macros for the newer XHTML language. CSS Tags(5) contains a stylesheet template and commonly needed rules for stylesheets.

Note the organization of the clips. Block indicates tags that start a new line in viewed files. Inline indicate tags that display as a continuation of text. The insertion carat indicates a clip that can be used to insert tags around existing content.

The first template (A Page Template) is a nice way to start a new HTML file. It sets up the basic mandatory structure for a valid HTML4 document. Double click on it to place the tags in the edit window. Note that important tags such as the doctype, character set and title are now set up as well as the head and body sections. The cursor is placed inside the title element waiting for an appropriate name.

Block - Head # and Block - Paragraph are the only templates you really need to obtain a working HTML document. These templates can be used in either of two ways. One is to click on the template caption first. This places the tags in the document window and leaves the cursor in the correct spot to type the desired content. Or you can type the content, select it with the shift key and cursor arrows (or click highlight), and then click on the template caption which then places the tags around the selected content.

Basic emphasis can be handled by one of three Inline tags; emphasis (<em>), strong (<strong>), and span.

Exploring Other TextPad Features

Many learn a new program by walking through the toolbar menu items, identifying those that are unique to the program and testing what they do.

One frequently used (I hope!) feature is Spell Checking. Use the toolbar to select Tools - Spelling.

Inserting the contents of another file into your document is a common operation for authors. No need to load the second file, cut and paste. Just Edit - Insert - Files... and select from the file browser.

Previewing an HTML document is such an important feature that TextPad makes it very easy to do. Use the toolbar to select View - In Web Browser or click on the globe. For this option to function the document must have an extension that is associated with your default browser.

If you are checking HTML documents with alternate browsers (always highly recommended) you can easily set up items on the Tools menu that will run the browser without leaving TextPad. From the menubar select Configure - Preferences. Click on the Tools folder, then press the ADD button. Finally select Program and Browse to the appropriate executable program.

Writing Your Own Clip Library

You will eventually want to create your own clip library to save keystrokes on repetitive tasks. The best way to learn how to write the script is by examining an existing clip library. The files are found in the Samples subfolder of TextPad 4. Each file has the extension .tcl (for textpad clip library). Open any one of them in TextPad and note patterns. Important command lines are as follows:

!TCL=5010 copyright ACME CORP.    copyright. 1st number must be unique
!TITLE=Special Stuff              caption that appears in select box
!SORT=y                           option to sort text template items
!CHARSET=ANSI                     do not touch - used for foreign stuff
!TEXT=CARAT INSERTION EXAMPLE     template name and signal start of defn
This prints text LEFT--\^--RIGHT  Note the backslash before the carat
of the insertion carat.
!                                 signal end of template definition

Adding Java Language Tools

Although TextPad is delivered with Java syntax aware color coding, some compile tools have to be added by the user. First, make sure you have the Java sdk setup correctly. Next from the Textpad toolbar select Configure - Preferences - Tools. Click on the ADD button and add the Java stuff. This will place compile, run application and run applet functions on the tools menu.


JR's HomePage | Comments [textpad.htm:2010 01 26]