Note that the richtext and jdoc modes can also generate limited HTML. They provide a more WYSIWYG environment, but (for instance) richtext mode doesn't let you generate hypertext, and neither mode lets you generate lists. I hope to fix that; when I do, jdoc mode may become a more attractive option for composing HTML than html mode itself.
I make no pretense that html mode even approaches completeness. It provides shortcuts for the HTML constructions I use most frequently in my documents, but for many tags (and all entities), you'll have to type raw HTML yourself. See Bugs and Limitations below for the most noticeable absences.
This document describes the html mode available with version 4.1/4.4 of jedit.
Be warned that html mode does not translate the `<', `>', and `&' characters into the corresponding HTML entities as you type; the assumption is that you're typing those characters as part of an HTML tag or entity. If you want to include literal `<', `>', or `&' characters in your document, you'll need to type them as `<,' `>', or `&', respectively.
* Some commands insert matching tags which surround text. These commands insert the tags around the selected stretch of text if there is one. If no text in the window is selected, then they insert the opening and closing tags around the insert point; i.e., the insert point ends up between the opening and closing tags. (You then need to move past the closing tag, either with the mouse or the keyboard, when you want to go back to typing ordinary, untagged text.) Thus, these commands accommodate the case where you want to apply an HTML tag to text you've just selected, as well as the case where you're about to type text that you wanted to be enclosed in a particular tag. The names of commands in this category start with `Make' (e.g., `Make Emphasized'
* Some commands pop up a prompt for additional information, and then use that information to insert some sort of moreorless complicated HTML construction in the document. These commands have ellipses at the end of their names (e.g. `Insert Image...'). Note that `Make URL Reference...' falls into both this category and the previous one.
* The remaining commands simply insert a single tag or sequence of text in the document. (Among these, `Insert Preformatted Selection' is special in that it uses the current X selection.)
In the prompt panel this command brings up, pressing the Tab key will do filename completion as in Emacs or tcsh; this is convenient when, as is often the case, the URL you want to link to is a relative URL to a file in the same directory (or a subdirectory).
In the selection, occurrences of the characters `<', `>', and `&' are replaced by the corresponding HTML entities, so that you don't have to worry about strings in the selection that might look like HTML tags or entities. (Once you've inserted the selection, you can of course add markup.)
* There's no support for automatic insertion of HTML entities (e.g., no way to type `<' and have it automatically replaced with `<', or to type `Ö' and have it automatically replaced with `Ö'.
* It's a bit clumsy to use the tagwrapping commands as you type, because you have to move over the closing tag when you're done. There should be a keystroke to do this automatically.
* The document template should be customisable.
* To some extent, htmlmode enforces my own (possibly warped :-) notions of HTML style.
* There should be a `Preview' command (either parsing the HTML directly or, more likely, passing it to an external HTML viewer).
* Obviously, the tag support needs to be more complete.
* There should be a way for the user to collect a library of HTML templates for document components on a second modespecific menu, for boilerplate text, graphics, or links.
* Ultimately, I want to replace this mode with a WYSIWYG one,
probably closely based on
jdocmode.