(me) + (-tic - suffix; having to do with) = Mark-tic

Marktic - mess with it until it breaks

  • blog
  • stories
  • genealogy
  • login
Home › My HTML-Kit › HTML-Kit › Plugins

mcHeaderP

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

mcheaderp.jpg

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:

mcheaderppref.jpg

Image of what mcHeaderP can do:

mcheaderpexample.jpg

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

‹ mcComIt up mcHybridList ›
  • HK Plugins
  • Login or register to post comments

My HTML-Kit

  • HTML-Kit
    • Plugins
      • mcCapLet
      • mcComIt
      • mcHeaderP
      • mcHybridList
      • mcInsertSpaces
      • mcLinesToLinks
      • mcMakeList
      • mcMultiTag
      • mcPWrap
      • mcWrapAtColumn
    • Mini-articles

Main

  • Home
  • My Blog
  • My Stories
  • Photo Gallery
  • Our Pets
  • My HTML-Kit
  • Free Software

Genealogy

  • My Genealogy
  • Family Tree

Recent blog posts

  • Wow, it's been that long?!
  • Japan, July 2009
  • Yellowstone 2009
  • Know what you believe and why
  • Family tree and photo gallery up and going
  • Mark's Virtual Playground is no more
  • Time for an update
  • Singapore 2008
  • We Survived Gustav
  • Photo Gallery back up, sort of
more
  • blog
  • stories
  • genealogy
  • login

Personal website of Mark Cunningham, Zachary, Louisiana

Powered by Drupal, an open source content management system

HTML-Kit Button