rem: EditorDisplayMode = mode; 
add: gEditorDisplayMode = mode; 
context: function SetDisplayMode(mode){  if (gIsHTMLEditor)  {    // Already in requested mode:    //  return false to indicate we didn't switch    if (mode == EditorDisplayMode)      return false;    EditorDisplayMode = 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");      // TODO: WE MUST DISABLE ALL KEYBOARD COMMANDS!      // THIS DOESN'T WORK!      gSourceContentWindow.focus();    }    else     {      // Switch to the normal editor (first in the deck)      gContentWindowDeck.setAttribute("index","0");      // TODO: WE MUST ENABLE ALL KEYBOARD COMMANDS!      gContentWindow.focus();    }    return true;  }}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/9a3e6237275e80d5e47235ea02622d2e8003692c/editor.js/clean/editor/ui/composer/content/editor.js