rem:    var menuItem = document.getElementById("objectProperties"); if (menuItem) { var element = GetSelectedElementOrParentCellOrLink(); var menuStr = GetString("ObjectProperties"); if (element && element.nodeName) { var objStr = ""; menuItem.setAttribute("disabled", ""); var name = element.nodeName.toLowerCase(); switch (name) { case "img": objStr = GetString("Image"); break; case "hr": objStr = GetString("HLine"); break; case "table": objStr = GetString("Table"); break; case "td": objStr = GetString("TableCell"); break; case "a": if (element.name) objStr = GetString("NamedAnchor"); else if(element.href) objStr = GetString("Link"); break; } menuStr = menuStr.replace(/%obj%/,objStr); } else {  menuItem.setAttribute("disabled","true");  menuStr = menuStr.replace(/%obj%/,"").replace(/^\s+/, "");  } menuItem.setAttribute("value", menuStr); } 
add: InitObjectPropertiesMenuitem("objectProperties"); 
context: function EditorInitFormatMenu(){  // Set strings and enable for the [Object] Properties item  // Note that we directly do the enabling instead of  //  using goSetCommandEnabled since we already have the menuitem  var menuItem = document.getElementById("objectProperties");  if (menuItem)  {    var element = GetSelectedElementOrParentCellOrLink();    var menuStr = GetString("ObjectProperties");    if (element && element.nodeName)    {      var objStr = "";      menuItem.setAttribute("disabled", "");      var name = element.nodeName.toLowerCase();      switch (name)      {        case "img":          objStr = GetString("Image");          break;        case "hr":          objStr = GetString("HLine");          break;        case "table":          objStr = GetString("Table");          break;        case "td":          objStr = GetString("TableCell");          break;        case "a":          if (element.name)            objStr = GetString("NamedAnchor");          else if(element.href)            objStr = GetString("Link");          break;      }      menuStr = menuStr.replace(/%obj%/,objStr);            }    else    {      // We show generic "Properties" string, but disable menu item      menuItem.setAttribute("disabled","true");      // Replace placeholder with "", then remaining space on left side      menuStr = menuStr.replace(/%obj%/,"").replace(/^\s+/, "");    }    menuItem.setAttribute("value", menuStr);  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/5eafc0feeb5eafc3a8dec8ecd2e935e7be206733/editor.js/clean/editor/ui/composer/content/editor.js