(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

mcComIt

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

mccomit.gif

mcComIt is located on the Documents action bar. By default mcComIt will insert html comment tags several different ways depending on whether text has been selected and if the user enters a comment or not.

Optionally PHP style comments can be entered using the pound symbol (#) or the forward slash (/). Although these would normally be used in appropriate code, I'm going to use HTML for examples sake.

mccomitoptions.gif

Here are some examples of how it works:

Text Selected + Comment Entered

Select (highlight) some text and click the mcComIt icon. When the input box
is presented enter the text for your comment.

Source:

<div>
<p>text text text</p>
</div>

HTML Comment:

<!--  My Comment -->
<div>
<p>text text text</p>
</div>
<!--  // My Comment -->

For the ### option:

######################################
# My Comment
######################################
<div>
<p>text text text</p>
</div>

######################################
# END: My Comment
######################################

For the /// option:

//////////////////////////////////////
// My Comment
//////////////////////////////////////
<div>
<p>text text text</p>
</div>
//////////////////////////////////////
// END: My Comment
//////////////////////////////////////

No Text Selected + Comment Entered

If no text is selected but you enter a comment, a single comment is inserted at the cursor and places whatever is to the right of it to the next line.

So if the cursor is located in front of the <p> tag you get this:

HTML:

<!--  My Comment -->
<div>
<p>text text text</p>
</div>

### option:


######################################
# My Comment
######################################

<div>
<p>text text text</p>
</div>

/// option:

//////////////////////////////////////
// My Comment
//////////////////////////////////////

<div>
<p>text text text</p>

</div>

No Text Selected + No Comment or Cancel

Clicking the 'Cancel' button on the input dialog box is the same as not
entering any text for the comment. In order to allow a single blank comment
the 'Cancel' button for all pratical purposes is ignored.

So, if no text is selected and the 'Cancel' button is clicked -or- no comment text is entered, you end up with a blank comment tag inserted at the cursor
with any text to the right of it moved to the next line.

HTML:

<!--   -->
<div>
<p>text text text</p>
</div>

### option:

######################################
# 
######################################
<div>
<p>text text text</p>
</div>

/// option:

//////////////////////////////////////
// 
//////////////////////////////////////
<div>

<p>text text text</p>
</div>

You can download this plugin on the HTML-Kit web site. Installation instructions, etc. are also available.

‹ mcCapLet up mcHeaderP ›
  • 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