You have chosen to sponsor your bid up to a maximum amount of .
Firefox extension Firebug (getfirebug.com) has a very nice HTML inspecting library. The code is reused in Firebug Lite (getfirebug.com/firebuglite) tool, which can inject HTML inspecting console (html+js) into any web page on any web browser.
1) it can be loaded into a web page as JavasScript files
2) given an ID of <div> element in a web page and HTML code as a string it would format the HTML code, place it into the <div> element, and let to browser the code exactly as it is done in Firebug Lite HTML inspecting window.
3) browsing the HTML code inside <div> should look like and behave exactly as it is while browsing code in Firebug Lite
4) there would be an option to hook on click and right click events
5) once clicked inside HTML inspecting DIV, the selected code would appear in a separate <textarea> tag.
6) every line of reused code must be marked( commented) as reused with reference to original source files in firebuglite library
7) if needed the jQuery library can be used.
an initialization of the library could look anything similar to:
var myInspector = new FireBugLiteInspector (id_of_a_div, "<html><body><div>my page to be inspected</div></body><html>");
I have attached a screenshot depicting how the div with HTML code should look like (inspecting.png)