When you click on the 'image' button you will insert image into wysiwyg. When you click on the inserted image you will see some blue border on the image. If you inspect it border in firebug you will see it is an inserted div
into wysiwyg. Also when you will compare content of iframe and content of textarea (where tinymce store editor output) you will see different html code.
How tinymce does map html code from iframe and output html code from textarea?
Do you know how do this any of existing editors?