Templates
Template is a file that contain the structure from which finished files can be derived. Templates help to create finished documents faster. In most cases it takes less time to create a document by adding content to an existing one rather than writing from scratch.
HTMLPad offers some instant templates, but you can also add your own.
Create file from template
To create new file from a template
- On the File menu, click New from Template.
- In the New from Template window use tabs to locate template you wish to use for your new document.
- Select the template with a single click.
- Click OK
Add template
To add your own template
- Open the file you wish to use as template.
- On the File menu, click Save As Template. Save dialog opens with current folder set to HTMLPad template folder.
- Select any existing subdirecotry or create your own subdirectory.
- Enter file name and click OK.
Replacement tokens
Replacement tokens are pieces of special code that allows your snippet to be customized dynamically by prompting user input.
Syntax
Replacement tokens may have one of the following forms:
%[Prompt message]%
%[Prompt message]=[default value]%
The last one would result the following dialog box:

Replacement tokens that have equal prompt names ("SomeName" in the example below) , are prompted just once for the first replacement token value. Other tokens will get their values from the first one. See Examples for an example.
%[SomeName]% ..text.. %[SomeName]%
Examples
1) The following snippet allows you to insert custom hyperlink:
<a href="%[Enter URL:]%">%[Enter link text:]=[Hello!]%</a>
When inserting this snippet you are prompted to Enter URL and Enter link text.
2) The following snippet allows you to insert custom option element:
<option value="%[Enter ID]%">%[Enter ID]%</option>
When inserting this snippet you are prompted to Enter ID just once, as value for the second replacement token is read from your first response on the prompt.
|