A javascript program using only jQuery without using command state query or command exec -- 2

Job ID: 31361239

Budget: ₹1,500 – ₹12,500 INR

1) I need a js program which tracks the cursor in a div-content editable. And tells me if the cursor is inbetween <b>,<I> , nested <ol><li> or <ul><li> tags.
2) the same js program should also have another function to put <b><I>etc tags when required without using command exec again.
In essence a custom command exec and command state query program without using them.
Related categories: JavaScript HTML5 jQuery / Prototype