rem: editorShell.InsertElement(element, false); 
add: try { editorShell.InsertElementAtSelection(element, false); } catch (e) { dump("Exception occured in InsertElementAtSelection\n"); } 
context: function onOK(){// Set attribute example://  imageElement.setAttribute("src",dialog.srcInput.value);  if (insertNew) {    editorShell.InsertElement(element, false);  } return true; // do close the window}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/6df53d78e87da76212f26738e05ec918d9d1125c/EdDialogTemplate.js/clean/editor/ui/dialogs/content/EdDialogTemplate.js