JTidy plugin

André Kaplan

Dale Anson

Legal Notice

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no "Invariant Sections", "Front-Cover Texts" or "Back-Cover Texts", each as defined in the license. A copy of the license can be found in the file COPYING.DOC.txt included with jEdit.


Table of Contents

Chapter 1. Presentation

The JTidy plugin integrates the reference JTidy utility (r938 version) which will help you to clean and correct HTML files.

The Tidy Home Page will give you an overview of Tidy's numerous features.

JTidy requires:

  • JDK 1.5

  • jEdit 4.3

  • ErrorList 1.9

  • Beauty 0.7.0

Chapter 2. Tidy

Options

All Tidy options are available from Utilities> Global Options...> Plugin Options> JTidy. As Tidy provides numerous options, they have been gathered into different categories:

  • General

  • Wrap/Indent

  • Format

  • Clean

  • XML

  • New Tags

Most options have good help right in the options dialog, so they shouldn't need explanation here. One item of note is the option for "No generated output". If this is selected, but you use the Beauty plugin to beautify html files with JTidy, this option is ignored.

Once you have set all your options you can either:

  • Tidy the current HTML buffer

  • Generate a configuration file reflecting the current configuration: Tidy is primarily a command-line tool and this file could be used to automate "tidification".

Error handling

When Tidy encounters an incorrect HTML construct, it throws either a warning or an error. Contrary to warnings, Tidy errors must be manually corrected since Tidy errors cause Tidy to fail.

These messages are captured and analyzed and then sent to the ErrorList plugin. This enables ErrorList to highlight warnings and errors in the original HTML buffer and to give a convenient access to the origin of the warnings/errors.

All messages except warnings are sent to the Activity Log.

Tip

When a file has a few errors among many warnings, it can be useful to click the button in ErrorList to see only the errors.

Chapter 3. License

The source code is distributed under the GPL. Please see http://www.fsf.org/copyleft/gpl.html

Chapter 4. Credits

Chapter 5. Feedback

The preferred way to send bug reports is to use the Sourceforge Bug Tracker at http://sourceforge.net/bugs/?group_id=588

You can also write to: