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: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/ba19e76b3af7269baf66e2c57c523119f007ec99/EdButtonProps.js/clean/editor/ui/dialogs/content/EdButtonProps.js