HtmlSideKick

Author: Dale Anson
based on an HTML grammar for javacc by Brian Goetz, Quiotix

Introduction

Suggestions welcome, please contact jedit-devel@lists.sourceforge.net.

This plugin parses HTML and JSP files and presents a tree view of the file to aid in navigation. In addition, it provides completion popups for elements, entities and attributes, and automatic insertion or completion of close-tags.

While designed specifically for HTML and JSP files, this plugin does a pretty good job of displaying ASP, ColdFusion, VRML, PHP, SGML, and Velocity files. Needless to say, it works with XML files too. You can elect to use this plugin for those edit modes by going to Plugins -> Plugin Options... -> SideKick -> Parsers, then selecting "html" for those edit modes.

Completion

The HtmlSideKick supports completion for elements and attributes. The completion info provided is not based on the DOCTYPE at the top, but rather based on an HTML "completion info" file which is included with the XML plugin. The DOCTYPE is ignored by the HtmlSideKick.

If you are editing non-XML-compliant HTML, keep in mind that XML plugin provides completion, and does not like attributes unless they are in quotes, so it may pop up completions in inappropriate places if your use of quotes is not XML-compliant.

Validation

HtmlSideKick provides no validation. If you switch to the XML parser, you can get full validation based on any DTD or XML Schema. The "loosest" HTML grammar recognized by the XML parser is this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
  
Settings

This plugin is an extension of both the SideKick and the XML plugins. This means that common options for this plugin are specified in the SideKick plugin options. Additional completion options, such as finishing the close-tag when you type </, or providing element/attribute popups based on an XML DTD or schema, are specified in the XML plugin's general options.

The settings for HtmlSideKick are found at Plugins -> Plugin Options... -> HtmlSideKick.

Showing Tag Attributes

There are 4 settings that affect the display of tag attributes:
  1. Show Tag Attributes When checked, all non-standard attributes (if any) for the tag will be displayed.
  2. Show Core Attributes When checked, the standard core html tag attributes (if any) will be displayed. The core attributes are: "id", "class", "style", and "title".
  3. Show Language Attributes When checked, the standard attributes (if any) for internationalization will be displayed. The language attributes are: "lang" and "dir".
  4. Show Script Attributes When checked, the standard attributes (if any) for scripting will be displayed. The scripting attributes are: "onclick", "ondblclick", "onmousedown", "onmouseup", "onmouseover", "onmousemove", "onmouseout", "onkeypress", "onkeydown", and "onkeyup".

Regardless of these settings, a full listing of the tag attributes, sorted alphabetically, can be seen by moving the mouse pointer over the tag display in the tree.

Showing Brackets

Display of < and > can be turned on or off by use of the Show tags with < and > checkbox.

Showing Tags

There are 3 settings that affect the display of tags themselves:

  1. Show All HTML Tags When selected, all html tags will be displayed.
  2. Show Block HTML Tags only When selected, only those html tags that are a "block", that is, there is both a start tag and an end tag, will be displayed.
  3. Show JSP Tags When checked, JSP tags will be displayed.
Future Plans
History