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: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/711c0f72c9655c2558d43bb716847f1a294b8372/EdDialogTemplate.js/clean/editor/ui/dialogs/content/EdDialogTemplate.js