add:   if (IsInHTMLSourceMode()) { var htmlSource = gSourceContentWindow.value; if (htmlSource.length > 0) { var beginHead = htmlSource.indexOf("<head"); if (beginHead == -1) { AlertWithTitle(GetString("Alert"), GetString("NoHeadTag"));  gEditorDisplayMode = DisplayModePreview; SetDisplayMode(DisplayModeSource); throw Components.results.NS_ERROR_FAILURE; }  var beginBody = htmlSource.indexOf("<body"); if (beginBody == -1) { AlertWithTitle(GetString("Alert"), GetString("NoBodyTag"));  gEditorDisplayMode = DisplayModePreview; SetDisplayMode(DisplayModeSource); throw Components.results.NS_ERROR_FAILURE; } } }  
context: function FinishHTMLSource(){  // Switch edit modes -- converts source back into DOM document  SetEditMode(PreviousNonSourceDisplayMode);}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/9a5b258a6b2e358077f097bb562516cbafb3093d/editor.js/clean/editor/ui/composer/content/editor.js