add:   document.getElementById("viewPreviewMode").setAttribute("checked","false"); document.getElementById("viewNormalMode").setAttribute("checked","false"); document.getElementById("viewAllTagsMode").setAttribute("checked","false"); document.getElementById("viewSourceMode").setAttribute("checked","true");  var menuID; switch(mode) { case DisplayModePreview: menuID = "viewPreviewMode"; break; case DisplayModeNormal: menuID = "viewNormalMode"; break; case DisplayModeAllTags: menuID = "viewAllTagsMode"; break; case DisplayModeSource: menuID = "viewSourceMode"; break; } if (menuID.length > 0) document.getElementById(menuID).setAttribute("checked","true");  
context: function SetDisplayMode(mode){  if (gIsHTMLEditor)  {    // Already in requested mode:    //  return false to indicate we didn't switch    if (mode == gEditorDisplayMode)      return false;    gEditorDisplayMode = mode;    // Save the last non-source mode so we can cancel source editing easily    if (mode != DisplayModeSource)      PreviousNonSourceDisplayMode = mode;        // Editorshell does the style sheet loading/unloading    editorShell.SetDisplayMode(mode);    // Set the UI states    gPreviewModeButton.setAttribute("selected",Number(mode == DisplayModePreview));    gNormalModeButton.setAttribute("selected",Number(mode == DisplayModeNormal));    gTagModeButton.setAttribute("selected",Number(mode == DisplayModeAllTags));    gSourceModeButton.setAttribute("selected", Number(mode == DisplayModeSource));    if (mode == DisplayModeSource)    {      // Switch to the sourceWindow (second in the deck)      gContentWindowDeck.setAttribute("index","1");      DisableMenusForHTMLSource(true);      //Hide the formating toolbar if not already hidden      gFormatToolbarHidden = gFormatToolbar.getAttribute("hidden");      if (gFormatToolbarHidden != "true")      {        gFormatToolbar.setAttribute("hidden", "true");      }      gSourceContentWindow.focus();    }    else     {      // Switch to the normal editor (first in the deck)      gContentWindowDeck.setAttribute("index","0");      // Restore menus and toolbars      DisableMenusForHTMLSource(false);      if (gFormatToolbarHidden != "true")      {        gFormatToolbar.setAttribute("hidden", gFormatToolbarHidden);      }      window._content.focus();    }    return true;  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/49bc32c783f8e8fbf15d440f1587990451b05b6f/editor.js/clean/editor/ui/composer/content/editor.js