fixed a bug that can not inset image in insertHTML()
update to Ben's version.