Editing HTML Pages

If you open an HTML page in the Workbench the default editor will typically be a web browser. This lets you work with the page, for example, using dynamic features and navigating to other pages.

However, if you want to edit or otherwise modify the page you may wish to use the HTML editor. To do this you should right-click on the file in a view such as the Package Explorer, and choose the Open With menu. One of the options will be Amateras HTML Editor, and you should choose this. The menu is shown below.


The Amateras HTML editor is based on the Amateras HTML plugin, an open source plugin that provides many useful features for working with web content. When the file is open it appears as below.


The editor provides a number of useful features including the following.

Syntax Error Reporting

If the editor finds problems in your HTML, such as unfinished or missing tags or attributes, these are reported as errors and warnings. In the following the p tag is missing its closing > and an error is reported.

HTML Error

Command Completion

At any stage you can type CTRL+space and you will get options for completing the command. For example, you may get suggestions for closing tags, or if you are in an href attribute you will get a file navigator. The following shows an example.

HTML Error

Source and Preview

At the base of the HTML editor window you can see two tabs labeled Source and Preview. These let you switch between seeing the HTML source and previewing the page.

Structure Hierarchy

You can get a view for the hierarchy of the structure of the document from the open/closers in the left-hand margin. Move the mouse over the margin, and a bar will appear that shows the extent of the tag.

HTML Outline

A special Outline view is given for the HTML page; this gives you an overview of the structure of the page. It also allows you to navigate to the different elements.

Palette Templates

The Palettes view allows you to insert templates of code into the file. You can open the Palettes view from the menu bar. Choose Window > Show View > Other > Amateras > Palette. This opens the Palette view as shown below.

HTML Error

It has sections for HTML, JSP, and webMathematica. The HTML section is shown; this has templates to add a number of different fragments of HTML into your document.