I don't know what sort of a WYSIWYG editor you are building or what those functions are doing, though at a glance I would advise to try setting the height and width attributes, not styles :
function iImage(){
var imgSrc = prompt('Enter image location', '');
imgSrc.height='100px';
imgSrc.width='50px';
if(imgSrc != null){
richTextField.document.execCommand('insertimage', false, imgSrc);
}
}
As the corrseponding HTML should be
<img src="..." height="100px" width="500px">
not
<img src="..." style="height100px;width:500px;">
EDIT:
You can find the solution here: How to get the image element after insert using execCommand?