Inserting Code

coding tools support a range of writing styles, from typing to point-and-click, and you can set the level of support you want: for repetitive tasks, you can use its productivity tools to enter repeated code blocks and required text; when coding tags that you are not familiar with, you can display pop-up tips and lists of language elements.


Some operations, such as browsing to files in tag editors and creating an image map, refer to the current directory. For information about how HomeSite determines the current directory with two Files tabs, see "About the Files Tabs".

Inserting tags from the QuickBar

The QuickBar is a customizable development toolbar. When you click a QuickBar toolbutton, it inserts code directly into the document or, for tags that require attributes, opens a tag editor.

In addition to toolbars for product tools and standard Windows commands, you can display toolbars for HTML, CFML, JSP, scripting, and ASP code.

Customizing toolbars

You can customize the QuickBar and toolbars in these ways:.
To do this
Do this
Change tab order in QuickBar
Right-click QuickBar; select Organize QuickBar; use arrow buttons to set the tab order
Move QuickBar
Drag the double lines at the left end of the toolbar
Reset QuickBar configuration
In Customize dialog box, Toolbars tab, click Reset to Defaults. This does not remove toolbar buttons that you have added.

You can customize a toolbar in these ways:
To do this
Do this
Display Customize dialog box
Select Options > Customize.
Change order of items in toolbar
In Customize dialog box, Visible Toolbars list, click a toolbar. Drag buttons and separators.
Add toolbutton
In Customize dialog box, Visible Toolbars list, click a toolbar. Drag button from Toolbuttons list to toolbar.
Add custom toolbutton
Click Add Custom Button. Custom Toolbutton dialog box displays. Select an action;complete entries for action; click OK.
Add separator
In Customize dialog box, Visible Toolbars list, click a toolbar. Click Add Separator. Separator is added. Drag separator.
Remove toolbutton or separator
In Customize dialog box, Visible Toolbars list, click a toolbar. Drag item from toolbar to outside of toolbar.
Add custom toolbar
In Customize dialog box, click Add Toolbar; enter a name; click OK. Select new toolbar; add toolbuttons.
Delete custom toolbar
In Customize dialog box, click Delete Toolbar.

Selecting tags from the Tag Chooser

The Tag Chooser provides access to the tag set in all supported languages. For details, see "About Language Support".

To use the Tag Chooser:

  1. In the editor, right-click and select Insert Tag.

    The left pane in the Tag Chooser displays the supported languages. The right pane displays the tags for the selected language.

  2. Do one of the following:
  3. Click a tag in the right pane.

    If you want to view syntax and usage information for the tag, click one of the Help icons below the right pane. The Help pane opens to display tag-specific help.

  4. To insert a tag, press Select for the highlighted tag or double-click it.

    Tags that are inserted directly into a document are listed with brackets in the right pane, such as <HTML></HTML>. All other tags have individual editors that open when the tag is selected.

  5. If an editor opens for the selected tag, complete the entries as needed and click OK to insert the tag.

    You can open the Help pane in an editor for syntax information.

You can resize the Tag Chooser and keep it open while you work.

Completing tags with Tag Editors

You can use a Tag Editor to add a lot of content within an existing tag, for example in the body tag.

To complete the details for a tag:

  1. In the Editor, position the cursor in the tag to complete.
  2. Right-click, and select Edit Current Tag from the popup menu.
  3. Complete the Tag Editor dialog box.

    For help, click the Embedded Help button or see the Tag Definitions documentation, located in the Help References pane.

  4. Click OK.

The Tag Editor closes, adding the attributes and values that you specified to the tag.