I think the problem is that the PasteHTML function only responds correctly when the onclick event is attachd to a button, or an input. I am putting the onclick on a div....e.g.: <div onclick="PasteHTML........
You can see an example at:
http://www.templatemonsterdirect.com/dev/cetest.aspxFirst, click on the PASTE HTML grey bar above all the buttons, and notice that it only pastes the HTML at the begining of the editor....Then click the insert HTML button and notice that everything works fine.