rem: buttonElement.innerHTML = editor.outputToString("text/html", 1); editor.insertElementAtSelection(buttonElement, true); 
add: if (!InsertElementAroundSelection(buttonElement)) { buttonElement.innerHTML = editor.outputToString("text/html", 1); editor.insertElementAtSelection(buttonElement, true); } 
context: function onAccept(){  // All values are valid - copy to actual element in doc or  //   element created to insert  ValidateData();  var editor = GetCurrentEditor();  editor.cloneAttributes(buttonElement, globalElement);  if (insertNew && !InsertElementAroundSelection(buttonElement))  {    buttonElement.innerHTML = editor.outputToString("text/html", 1); // OutputSelectionOnly (see nsIDocumentEncoder.h)    editor.insertElementAtSelection(buttonElement, true);  }  SaveWindowLocation();  return true;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/161212bb0026cff780d4cc07e50d7cf54d70e70b/EdButtonProps.js/buggy/editor/ui/dialogs/content/EdButtonProps.js