mcHeaderP
Mark — Sat, 12/24/2005 - 23:02

This plugin will take blocks of selected text and wrap them with either header tags or paragraph tags.
The User Preferences allow the User to determine which blocks of text should be headers based on the minimum number of blank lines between the blocks of text. Remember this is the minimum. In other words if the lines above is set to 3 and the lines below is set to 3 and there are 4 blank lines above and 4 blank lines below, it will become a header. But both must be true. So, using the settings above, if there are 2 blank lines above and 4 blank lines below, it will become a paragraph because the blanks lines above AND below does not meet the minimum requirements set.
The size or type of header tag is also defined by the User in the Preferences. By default it uses <h1></h1> tags.
All other blocks of text that are separated by one (1) blank line will be wrapped with <p></p> tags.
For example, it takes this;
First line is always a header The first line or block of text is always a header regardless of how many blank lines are above or below. This is a header The reason the above is a header is it has two blank lines above and one below. The defaults are used, so it meets the criteria. This is a paragraph because it only has one line above and none below. Since it doesn't meet the criteria for a header, it's a paragraph.
... and will turn it into this:
<h1>First line is always a header</h1> <p>This block of text has one above and one below, so it's a paragraph because it doesn't meet the criteria to be a header.</p> <h1>This is a header</h1> <p>The reason the above is a header is it had two blank lines above and one below. So it meets the criteria.</p> <p>This is a paragraph because it only has one line above and none below. Since it doesn't meet the criteria for a header, it's a paragraph.</p>
The User can also set in the Preferences whether the selected text should be
overwritten or have the results sent to the Output Window in split view.
The default settings are:
- Size of Header Tag = 1 (e.g. <h1></h1>)
- Blank Lines Above = 2
- Blank Lines Below = 1
- Output Mode = Output Window
Screenshot of Preferences window:

Image of what mcHeaderP can do:

This plugin can be downloaded from this page on the HTML-Kit web site. Installation instructions, etc. are also located there.