home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Complet / thunderbird / chrome / mail.jar / content / editor / editorOverlay.xul < prev    next >
Encoding:
Extensible Markup Language  |  2003-12-07  |  64.3 KB  |  972 lines

  1. <?xml version="1.0"?> 
  2. <!--
  3.    - The contents of this file are subject to the Netscape Public
  4.    - License Version 1.1 (the "License"); you may not use this file
  5.    - except in compliance with the License. You may obtain a copy of
  6.    - the License at http://www.mozilla.org/NPL/
  7.    -  
  8.    - Software distributed under the License is distributed on an "AS
  9.    - IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  10.    - implied. See the License for the specific language governing
  11.    - rights and limitations under the License.
  12.    -  
  13.    - The Original Code is Mozilla Communicator client code, released
  14.    - March 31, 1998.
  15.    - 
  16.    - The Initial Developer of the Original Code is Netscape
  17.    - Communications Corporation. Portions created by Netscape are
  18.    - Copyright (C) 1999 Netscape Communications Corporation. All
  19.    - Rights Reserved.
  20.    - 
  21.    - Contributor(s):
  22.    -   Ryan Cassin (rcassin@supernova.org)
  23.    -   Daniel Glazman (glazman@netscape.com)
  24.    -   Aaron Kaluszka (ask@swva.net)
  25.    -   Stephen Donner (technutz@netscape.net)
  26. -->
  27.  
  28. <!DOCTYPE overlay [
  29. <!ENTITY % editorOverlayDTD SYSTEM "chrome://editor/locale/editorOverlay.dtd">
  30. %editorOverlayDTD;
  31. <!ENTITY % platformCommunicatorDTD SYSTEM
  32.   "chrome://communicator-platform/locale/platformCommunicatorOverlay.dtd">
  33. %platformCommunicatorDTD;
  34. ]>
  35.  
  36. <overlay id="editorOverlay"
  37.          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  38.  
  39. <script type="application/x-javascript" src="chrome://editor/content/editorUtilities.js"/>
  40. <script type="application/x-javascript" src="chrome://editor/content/ComposerCommands.js"/>
  41. <script type="application/x-javascript" src="chrome://communicator/content/XPCNativeWrapper.js"/>
  42.  
  43.   <keyset id="editorKeys">
  44.     <!-- defined in globalOverlay -->
  45.     <key id="key_newNavigator"/>
  46.     <key id="key_newBlankPage"/>
  47.  
  48.     <key id="openeditorkb"   key="&fileopen.keybinding;"   observes="cmd_open"  modifiers="accel"/>
  49.     <key id="openremoteeditorkb"  key="&fileopenremote.keybinding;"  observes="cmd_openRemote"  modifiers="accel,shift"/>
  50.     <key id="savekb"         key="&filesave.keybinding;"   observes="cmd_save"   modifiers="accel"/>
  51.     <key id="publishkb"      key="&filesave.keybinding;"   observes="cmd_publish" modifiers="accel,shift"/>
  52.     <key id="closekb"        key="&fileclose.keybinding;"  observes="cmd_close"  modifiers="accel"/>
  53.     <key id="printkb"        key="&fileprint.keybinding;"  observes="cmd_print"  modifiers="accel"/>
  54.     <key id="key_quit"/>
  55.     <key id="key_undo"/>
  56.     <key id="key_redo"/>
  57.     <key id="key_cut"/>
  58.     <key id="key_copy"/>
  59.     <key id="key_paste"/>
  60.     <key id="key_delete"/>
  61.     <key id="key_selectAll"/>
  62.     <key id="pastequotationkb"  key="&editpastequotation.keybinding;"   observes="cmd_pasteQuote"  modifiers="accel, shift"/>
  63.     <key id="findkb"            key="&editfind.keybinding;"            observes="cmd_find"  modifiers="accel"/>
  64.     <key id="findnextkb"        key="&editfindnext.keybinding;"        observes="cmd_findNext"  modifiers="accel"/>
  65.     <key id="findprevkb"        key="&editfindprev.keybinding;"        observes="cmd_findPrev"  modifiers="accel,shift"/>
  66.     <key keycode="&editfindnext.keybinding2;" observes="cmd_findNext"/>
  67.     <key keycode="&editfindprev.keybinding2;" observes="cmd_findPrev" modifiers="shift"/>
  68.     <key id="checkspellingkb"
  69.          key="&editcheckspelling.keybinding;"
  70.          observes="cmd_spelling"
  71.          modifiers="&accel.emacs_conflict;"
  72.          disabled="true"
  73.     />
  74.  
  75.     <key id="boldkb"         key="&stylebold.keybinding;"       observes="cmd_bold" modifiers="accel"/>
  76.     <key id="italickb"       key="&styleitalic.keybinding;"     observes="cmd_italic" modifiers="accel"/>
  77.     <key id="underlinekb"    key="&styleunderline.keybinding;"  observes="cmd_underline" modifiers="accel"/>
  78.     <key id="fixedwidthkb"   key="&formatfontfixed.keybinding;" observes="cmd_tt" modifiers="accel"/>
  79.  
  80.     <key id="increaseindentkb"  key="&formatindent.keybinding;"  observes="cmd_indent"  modifiers="accel"/>
  81.     <key id="decreaseindentkb"  key="&formatoutdent.keybinding;"  observes="cmd_outdent"  modifiers="accel"/>
  82.  
  83.     <key id="removestyleskb"       key="&formatremovestyles.keybinding;"   observes="cmd_removeStyles"  modifiers="accel, shift"/>
  84.     <key id="removestyleskb2"       key=" "   observes="cmd_removeStyles"  modifiers="accel"/>
  85.     <key id="removelinkskb"        key="&formatremovelinks.keybinding;"    observes="cmd_removeLinks"  modifiers="accel, shift"/>
  86.     <key id="removenamedanchorskb" key="&formatremovenamedanchors.keybinding;"    observes="cmd_removeNamedAnchors"  modifiers="accel, shift"/>
  87.     <key id="decreasefontsizekb"   key="&decreaseFontSize.keybinding;"     observes="cmd_decreaseFont"  modifiers="accel"/>
  88.     <key id="increasefontsizekb"   key="&increaseFontSize.keybinding;"     observes="cmd_increaseFont"  modifiers="accel"/>
  89.     <key                           key="&increaseFontSize.keybinding;"     observes="cmd_increaseFont"  modifiers="accel,shift"/>
  90.     <key                           key="&increaseFontSize.keybinding2;"    observes="cmd_increaseFont"  modifiers="accel"/>
  91.  
  92.     <key id="insertlinkkb"         key="&insertlink.keybinding;"           observes="cmd_link"          modifiers="accel"/>
  93.   </keyset>
  94.  
  95.   <!-- commands updated when the editor gets created -->
  96.   <commandset id="commonEditorMenuItems"
  97.           commandupdater="true"
  98.           events="create"
  99.           oncommandupdate="goUpdateComposerMenuItems(this)"
  100.   >
  101.     <command id="cmd_open"                                          oncommand="goDoCommand('cmd_open')"/>
  102.     <command id="cmd_openRemote"   label="&openremoteCmd.label;"    oncommand="goDoCommand('cmd_openRemote')"/>
  103.     <command id="cmd_close"        label="&closeCmd.label;"         oncommand="goDoCommand('cmd_close')"/>
  104.     <command id="cmd_printSetup"   oncommand="goDoCommand('cmd_printSetup')"/>
  105. <!--
  106.     <command id="cmd_printPreview" label="&printPreviewCmd.label;"  oncommand="goDoCommand('cmd_printPreview')"/>
  107. -->
  108.     <command id="cmd_print"                                         oncommand="goDoCommand('cmd_print')"/>
  109.     <command id="cmd_quit"         oncommand="goDoCommand('cmd_quit')"/>
  110.   </commandset>
  111.  
  112.   <commandset id="composerMenuItems"
  113.           commandupdater="true"
  114.           events="create, mode_switch"
  115.           oncommandupdate="goUpdateComposerMenuItems(this)"
  116.   >
  117.     <!-- format menu -->
  118.     <command id="cmd_listProperties"  oncommand="goDoCommand('cmd_listProperties')"/>
  119.     <command id="cmd_pageProperties"  oncommand="goDoCommand('cmd_pageProperties')"/>
  120.     <command id="cmd_colorProperties" oncommand="goDoCommand('cmd_colorProperties')"/>
  121.  
  122.     <command id="cmd_link"             oncommand="goDoCommand('cmd_link')"/>
  123.     <command id="cmd_anchor"           oncommand="goDoCommand('cmd_anchor')"/>
  124.     <command id="cmd_image"            oncommand="goDoCommand('cmd_image')"/>
  125.     <command id="cmd_hline"            oncommand="goDoCommand('cmd_hline')"/>
  126.     <command id="cmd_table"            oncommand="goDoCommand('cmd_table')"/>
  127.     <command id="cmd_form"             oncommand="goDoCommand('cmd_form')"/>
  128.     <command id="cmd_inputtag"         oncommand="goDoCommand('cmd_inputtag')"/>
  129.     <command id="cmd_inputimage"       oncommand="goDoCommand('cmd_inputimage')"/>
  130.     <command id="cmd_textarea"         oncommand="goDoCommand('cmd_textarea')"/>
  131.     <command id="cmd_select"           oncommand="goDoCommand('cmd_select')"/>
  132.     <command id="cmd_button"           oncommand="goDoCommand('cmd_button')"/>
  133.     <command id="cmd_label"            oncommand="goDoCommand('cmd_label')"/>
  134.     <command id="cmd_fieldset"         oncommand="goDoCommand('cmd_fieldset')"/>
  135.     <command id="cmd_isindex"          oncommand="goDoCommand('cmd_isindex')"/>
  136.     <command id="cmd_objectProperties" oncommand="goDoCommand('cmd_objectProperties')"/>
  137.     <command id="cmd_insertChars"      oncommand="goDoCommand('cmd_insertChars')"    label="&insertCharsCmd.label;"/>
  138.     <command id="cmd_insertHTMLWithDialog" oncommand="goDoCommand('cmd_insertHTMLWithDialog')"  label="&insertHTMLCmd.label;"/>
  139.  
  140.     <command id="cmd_insertBreak"      oncommand="goDoCommand('cmd_insertBreak')"/>
  141.     <command id="cmd_insertBreakAll"   oncommand="goDoCommand('cmd_insertBreakAll')"/>
  142.     <command id="cmd_NormalMode"       oncommand="goDoCommand('cmd_NormalMode')"     label="&NormalMode.label;"/>
  143.     <command id="cmd_AllTagsMode"      oncommand="goDoCommand('cmd_AllTagsMode')"    label="&AllTagsMode.label;"/>
  144.     <command id="cmd_HTMLSourceMode"   oncommand="goDoCommand('cmd_HTMLSourceMode')"/>
  145.     <command id="cmd_PreviewMode"      oncommand="goDoCommand('cmd_PreviewMode')"    label="&PreviewMode.label;"/>
  146.  
  147.     <!-- only used in context popup menu -->
  148.     <command id="cmd_editLink"         oncommand="goDoCommand('cmd_editLink')"/>
  149.  
  150.     <!-- dummy command used just to disable things in non-HTML modes -->
  151.     <command id="cmd_renderedHTMLEnabler"/>
  152.   </commandset>
  153.   
  154.   <commandset id="composerSaveMenuItems"
  155.           commandupdater="true"
  156.           events="create, save"
  157.           oncommandupdate="goUpdateComposerMenuItems(this)"
  158.   >
  159.     <command id="cmd_save"           label="&saveCmd.label;"           oncommand="goDoCommand('cmd_save')"/>
  160.     <command id="cmd_saveAs"         label="&saveAsCmd.label;"         oncommand="goDoCommand('cmd_saveAs')"/>
  161.     <command id="cmd_exportToText"   label="&exportToTextCmd.label;"   oncommand="goDoCommand('cmd_exportToText')"/>
  162.     <command id="cmd_saveAsCharset"  label="&saveAsCharsetCmd.label;"  oncommand="goDoCommand('cmd_saveAsCharset')"/>
  163.     <command id="cmd_publish"        label="&publishCmd.label;"        oncommand="goDoCommand('cmd_publish')"/>
  164.     <command id="cmd_publishAs"      label="&publishAsCmd.label;"      oncommand="goDoCommand('cmd_publishAs')"/>
  165.     <command id="cmd_revert"         label="&fileRevert.label;"        oncommand="goDoCommand('cmd_revert')"/>
  166.     <command id="cmd_preview"                                          oncommand="goDoCommand('cmd_preview')"/>
  167.     <command id="cmd_editSendPage"   label="&sendPageCmd.label;"
  168.                                      accesskey="&sendPage.accesskey;"  oncommand="goDoCommand('cmd_editSendPage')"/>
  169.   </commandset>
  170.  
  171.  
  172.   <!-- edit menu commands. These get updated by code in globalOverlay.js -->
  173.   <commandset id="composerEditMenuItems"
  174.           commandupdater="true"
  175.           events="create, mode_switch"
  176.           oncommandupdate="goUpdateComposerMenuItems(this)"
  177.   >
  178.     <command id="cmd_undo"/>
  179.     <command id="cmd_redo"/>
  180.     <command id="cmd_cut"/>
  181.     <command id="cmd_copy"/>
  182.     <command id="cmd_paste"/>  
  183.     <command id="cmd_pasteNoFormatting" oncommand="goDoCommand('cmd_pasteNoFormatting')"
  184.              label="&pasteNoFormatting.label;" accesskey="&pasteNoFormatting.accesskey;"/>
  185.     <command id="cmd_delete"/>
  186.     <command id="cmd_selectAll"/>
  187.     <command id="cmd_preferences"   oncommand="goDoCommand('cmd_preferences')"/>
  188.     <command id="cmd_find"          oncommand="goDoCommand('cmd_find')"/>
  189.     <command id="cmd_findNext"      oncommand="goDoCommand('cmd_findNext')"     label="&findAgainCmd.label;"/>
  190.     <command id="cmd_findPrev"      oncommand="goDoCommand('cmd_findPrev')"     label="&findPrevCmd.label;"/>
  191.     <command id="cmd_spelling"      oncommand="goDoCommand('cmd_spelling')"/>
  192.     <command id="cmd_validate"      label="&validateCmd.label;" accesskey="&validate.accesskey;" oncommand="goDoCommand('cmd_validate')"/>
  193.     <command id="cmd_checkLinks"    oncommand="goDoCommand('cmd_checkLinks')"/>
  194.     <command id="cmd_pasteQuote"    oncommand="goDoCommand('cmd_pasteQuote')" label="&pasteAsQuotationCmd.label;"/>
  195.     <command id="cmd_publishSettings" label="&publishSettings.label;" accesskey="&publishSettings.accesskey;" oncommand="goDoCommand('cmd_publishSettings')"/>
  196.   </commandset>
  197.  
  198.   <!-- style related commands that update on creation, and on selection change -->
  199.   <commandset id="composerStyleMenuItems"
  200.           commandupdater="true"
  201.           events="create, style, mode_switch"
  202.           oncommandupdate="goUpdateComposerMenuItems(this)"
  203.   >
  204.     <command id="cmd_bold"          state="false"     oncommand="doStyleUICommand('cmd_bold')"/>
  205.     <command id="cmd_italic"        state="false"     oncommand="doStyleUICommand('cmd_italic')"/>
  206.     <command id="cmd_underline"     state="false"     oncommand="doStyleUICommand('cmd_underline')"/>
  207.     <command id="cmd_tt"            state="false"     oncommand="doStyleUICommand('cmd_tt')"/>
  208.     <command id="cmd_smiley"/>
  209.  
  210.     <command id="cmd_strikethrough" state="false"     oncommand="doStyleUICommand('cmd_strikethrough');"/>
  211.     <command id="cmd_superscript"   state="false"     oncommand="doStyleUICommand('cmd_superscript');"/>
  212.     <command id="cmd_subscript"     state="false"     oncommand="doStyleUICommand('cmd_subscript');"/>
  213.     <command id="cmd_nobreak"       state="false"     oncommand="doStyleUICommand('cmd_nobreak');"/>
  214.  
  215.     <command id="cmd_em"            state="false"     oncommand="doStyleUICommand('cmd_em')"/>
  216.     <command id="cmd_strong"        state="false"     oncommand="doStyleUICommand('cmd_strong')"/>
  217.     <command id="cmd_cite"          state="false"     oncommand="doStyleUICommand('cmd_cite')"/>
  218.     <command id="cmd_abbr"          state="false"     oncommand="doStyleUICommand('cmd_abbr')"/>
  219.     <command id="cmd_acronym"       state="false"     oncommand="doStyleUICommand('cmd_acronym')"/>
  220.     <command id="cmd_code"          state="false"     oncommand="doStyleUICommand('cmd_code')"/>
  221.     <command id="cmd_samp"          state="false"     oncommand="doStyleUICommand('cmd_samp')"/>
  222.     <command id="cmd_var"           state="false"     oncommand="doStyleUICommand('cmd_var')"/>
  223.  
  224.     <command id="cmd_ul"            state="false"     oncommand="doStyleUICommand('cmd_ul')"/>
  225.     <command id="cmd_ol"            state="false"     oncommand="doStyleUICommand('cmd_ol')"/>
  226.  
  227.     <command id="cmd_indent"                          oncommand="goDoCommand('cmd_indent')"/>
  228.     <command id="cmd_outdent"                         oncommand="goDoCommand('cmd_outdent')"/>
  229.  
  230.     <!-- the state attribute gets filled with the paragraph format before the command is exectued -->
  231.     <command id="cmd_paragraphState"  state=""         oncommand="doStatefulCommand('cmd_paragraphState', event.target.value)"/>
  232.     <command id="cmd_fontFace"        state=""         oncommand="doStatefulCommand('cmd_fontFace', event.target.value)"/>
  233.  
  234.     <!-- No "oncommand", use EditorSelectColor() to bring up color dialog -->
  235.     <command id="cmd_fontColor"       state=""/>
  236.     <command id="cmd_backgroundColor" state=""/>
  237.     <command id="cmd_highlight"       state="transparent"  oncommand="EditorSelectColor('Highlight', event);"/>
  238.  
  239.     <command id="cmd_fontSize"                         oncommand="goDoCommand('cmd_fontSize')"/>
  240.     <command id="cmd_align"           state=""/>
  241.  
  242.     <command id="cmd_absPos"          state=""        oncommand="goDoCommand('cmd_absPos')"/>
  243.     <command id="cmd_increaseZIndex"  state=""        oncommand="goDoCommand('cmd_increaseZIndex')"/>
  244.     <command id="cmd_decreaseZIndex"  state=""        oncommand="goDoCommand('cmd_decreaseZIndex')"/>
  245.  
  246.     <command id="cmd_advancedProperties"              oncommand="goDoCommand('cmd_advancedProperties')"/>
  247.  
  248.     <command id="cmd_increaseFont"                    oncommand="goDoCommand('cmd_increaseFont')"/>
  249.     <command id="cmd_decreaseFont"                    oncommand="goDoCommand('cmd_decreaseFont')"/>
  250.     
  251.     <command id="cmd_removeStyles"                    oncommand="goDoCommand('cmd_removeStyles')"/>
  252.     <command id="cmd_removeLinks"                     oncommand="goDoCommand('cmd_removeLinks')"/>
  253.     <command id="cmd_removeNamedAnchors"              oncommand="goDoCommand('cmd_removeNamedAnchors')"/>
  254.     <command id="cmd_updateStructToolbar"             oncommand="goDoCommand('cmd_updateStructToolbar')"/>
  255.   </commandset>
  256.  
  257.   <!-- commands updated only when the menu gets created -->
  258.   <commandset id="composerListMenuItems"
  259.           commandupdater="true"
  260.           events="create, mode_switch"
  261.           oncommandupdate="goUpdateComposerMenuItems(this)">
  262.     <!-- List menu  -->
  263.     <command id="cmd_dt"                  oncommand="doStyleUICommand('cmd_dt')"/>
  264.     <command id="cmd_dd"                  oncommand="doStyleUICommand('cmd_dd')"/>
  265.     <command id="cmd_removeList"          oncommand="goDoCommand('cmd_removeList')"/>
  266.     <!-- cmd_ul and cmd_ol are shared with toolbar and are in composerStyleMenuItems commandset -->
  267.   </commandset>
  268.  
  269.   <commandset id="composerTableMenuItems"
  270.           commandupdater="true"
  271.           events="create, mode_switch"
  272.           oncommandupdate="goUpdateTableMenuItems(this)">
  273.     <!-- Table menu -->
  274.     <command id="cmd_SelectTable"         oncommand="goDoCommand('cmd_SelectTable')"/>
  275.     <command id="cmd_SelectRow"           oncommand="goDoCommand('cmd_SelectRow')"/>
  276.     <command id="cmd_SelectColumn"        oncommand="goDoCommand('cmd_SelectColumn')"/>
  277.     <command id="cmd_SelectCell"          oncommand="goDoCommand('cmd_SelectCell')"/>
  278.     <command id="cmd_SelectAllCells"      oncommand="goDoCommand('cmd_SelectAllCells')"/>
  279.     <command id="cmd_InsertTable"         oncommand="goDoCommand('cmd_InsertTable')"/>
  280.     <command id="cmd_InsertRowAbove"      oncommand="goDoCommand('cmd_InsertRowAbove')"/>
  281.     <command id="cmd_InsertRowBelow"      oncommand="goDoCommand('cmd_InsertRowBelow')"/>
  282.     <command id="cmd_InsertColumnBefore"  oncommand="goDoCommand('cmd_InsertColumnBefore')"/>
  283.     <command id="cmd_InsertColumnAfter"   oncommand="goDoCommand('cmd_InsertColumnAfter')"/>
  284.     <command id="cmd_InsertCellBefore"    oncommand="goDoCommand('cmd_InsertCellBefore')"/>
  285.     <command id="cmd_InsertCellAfter"     oncommand="goDoCommand('cmd_InsertCellAfter')"/>
  286.     <command id="cmd_DeleteTable"         oncommand="goDoCommand('cmd_DeleteTable')"/>
  287.     <command id="cmd_DeleteRow"           oncommand="goDoCommand('cmd_DeleteRow')"/>
  288.     <command id="cmd_DeleteColumn"        oncommand="goDoCommand('cmd_DeleteColumn')"/>
  289.     <command id="cmd_DeleteCell"          oncommand="goDoCommand('cmd_DeleteCell')"/>
  290.     <command id="cmd_DeleteCellContents"  oncommand="goDoCommand('cmd_DeleteCellContents')"/>
  291.     <command id="cmd_NormalizeTable"      oncommand="goDoCommand('cmd_NormalizeTable')"/>
  292.     <command id="cmd_JoinTableCells"      oncommand="goDoCommand('cmd_JoinTableCells')"/>
  293.     <command id="cmd_SplitTableCell"      oncommand="goDoCommand('cmd_SplitTableCell')"/>
  294.     <command id="cmd_ConvertToTable"      oncommand="goDoCommand('cmd_ConvertToTable')"/>
  295.     <command id="cmd_TableOrCellColor"    oncommand="goDoCommand('cmd_TableOrCellColor')"/>
  296.     <command id="cmd_editTable"           oncommand="goDoCommand('cmd_editTable')"/>
  297.   </commandset>
  298.  
  299.   <broadcasterset id="broadcasterset">
  300.     <!-- Broadcasters/commands with no other home -->
  301.     <!-- view menu -->
  302.     <command id="cmd_newNavigator"/>
  303.     <command id="cmd_newEditor"/>
  304.     <command id="cmd_newEditorTemplate"/>
  305.     <command id="cmd_newEditorDraft"/>
  306.  
  307.     <command id="cmd_viewCompToolbar"     oncommand="goToggleToolbar('EditToolbar','cmd_viewCompToolbar');"         checked="true"/>
  308.     <command id="cmd_viewFormatToolbar"   oncommand="goToggleToolbar('FormatToolbar','cmd_viewFormatToolbar');"     checked="true"/>
  309.     <command id="cmd_viewEditModeToolbar" oncommand="goToggleToolbar('EditModeToolbar','cmd_viewEditModeToolbar');" checked="true"/>
  310.     <command id="cmd_viewtaskbar"         oncommand="goToggleToolbar('status-bar','cmd_viewtaskbar');"              checked="true"/>
  311.  
  312.     <!-- Obsolete; these will go away -->
  313.     <command id="Editor:Font:Size" fontsize=""/>
  314.   </broadcasterset>
  315.  
  316.   <!-- File  menu items -->
  317.   <!-- Note: globalOverlay.xul uses menu_newEditor, but we want different menu item text
  318.              so we use our own id, label, and accesskey but connect to the same global key and broadcaster node
  319.    -->
  320.   <menu id="fileMenu" label="&fileMenu.label;" accesskey="&filemenu.accesskey;">
  321.     <menupopup id="menu_FilePopup" onpopupshowing="EditorInitFileMenu();">
  322.       <menu id="menu_New">
  323.         <menupopup id="menu_NewPopup">
  324.           <menuitem id="menu_newBlankPage" label="&newBlankPageCmd.label;" 
  325.                     accesskey="&newBlankPage.accesskey;" key="key_newBlankPage"
  326.                     command="cmd_newEditor"/>
  327.           <menuseparator id="composerBeginGlobalNewItems"/>
  328.           <!-- From globalOverlay.xul -->
  329.           <menuitem id="menu_newNavigator" observes="cmd_newNavigator"/>
  330.         </menupopup>
  331.       </menu>
  332.       <menuitem accesskey="&fileopenremote.accesskey;"      key="openremoteeditorkb" observes="cmd_openRemote"/>
  333.       <menuitem accesskey="&fileopen.accesskey;"            key="openeditorkb"       observes="cmd_open" label="&openFileCmd.label;"/>
  334.       <menu id="menu_RecentFiles" accesskey="&filerecentmenu.accesskey;" label="&fileRecentMenu.label;"
  335.             onpopupshowing="BuildRecentPagesMenu();">
  336.         <menupopup id="menupopup_RecentFiles" oncommand="editPage(event.target.getAttribute('value'), window, false);"/>
  337.           <!-- menuitems appended at runtime -->
  338.       </menu>
  339.       <menuitem accesskey="&fileclose.accesskey;" key="closekb" observes="cmd_close"/>
  340.       <menuseparator/>
  341.       <menuitem id="saveMenuitem" accesskey="&filesave.accesskey;" key="savekb" observes="cmd_save"/>
  342.       <menuitem accesskey="&filesaveas.accesskey;" observes="cmd_saveAs"/>
  343.       <menuitem accesskey="&filesaveascharset.accesskey;" observes="cmd_saveAsCharset"/>
  344.       <menuseparator/>
  345.       <menuitem id="publishMenuitem" accesskey="&publishcmd.accesskey;" key="publishkb" observes="cmd_publish"/>
  346.       <menuitem accesskey="&publishas.accesskey;" observes="cmd_publishAs"/>
  347.       <menuseparator/>
  348.       <menuitem accesskey="&filerevert.accesskey;" observes="cmd_revert"/>
  349.       <menuseparator/>
  350.       <menuitem id="fileExportToText"  accesskey="&fileexporttotext.accesskey;" observes="cmd_exportToText"/>
  351.       <menuitem id="previewInBrowser" label="&previewCmd.label;"  accesskey="&filepreview.accesskey;" observes="cmd_preview"/>
  352.       <!-- menuitem id="menu_SendPage" is merged here from mailEditorOverlay.xul,
  353.            where "position" is assumed to be just after 'previewInBrowser'  -->
  354.       <menuitem id="printSetupMenuItem" accesskey="&fileprintsetup.accesskey;" label="&printSetupCmd.label;" command="cmd_printSetup"/>
  355.       <menuitem id="printMenuItem" accesskey="&fileprint.accesskey;" key="printkb" observes="cmd_print" label="&printCmd.label;"/>
  356.       <!-- The Exit/Quit item is merged from platformGlobalOverlay.xul -->
  357.     </menupopup>
  358.   </menu>
  359.  
  360.   <menu id="editMenu" label="&editMenu.label;" accesskey="&editmenu.accesskey;">
  361.     <menupopup id="edEditMenuPopup">
  362.       <!-- from utilityOverlay.xul -->
  363.       <menuitem id="menu_undo"/>
  364.       <menuitem id="menu_redo"/>
  365.       <menuseparator id="edEditMenuSep1" />
  366.       <menuitem id="menu_cut"/>
  367.       <menuitem id="menu_copy"/>
  368.       <menuitem id="menu_paste"/>
  369.       <menuitem id="menu_pasteNoFormatting" observes="cmd_pasteNoFormatting"/>"
  370.  
  371. <!-- PasteAs not implemented yet
  372.       <menu id="menu_pasteAs" label="&pasteAs.label;" accesskey="&pasteAs.accesskey;">
  373.         <menupopup onpopupshowing="InitPasteAsMenu();">
  374.           <menuitem id="menu_pasteText"    label="&pasteTextCmd.label;"     accesskey="&pasteText.accesskey;"/>
  375.           <menuitem id="menu_pasteImage"   label="&pasteImageCmd.label;"    accesskey="&pasteImage.accesskey;"/>
  376.           <menuseparator/>
  377.           <menuitem id="menu_pasteRows"    label="&pasteRowsCmd.label;"     accesskey="&pasteRows.accesskey;"/>
  378.           <menuitem id="menu_pasteColumns" label="&pasteColumnsCmd.label;"  accesskey="&pasteColumns.accesskey;"/>
  379.           <menuitem id="menu_pasteTable"                                    accesskey="&pasteTable.accesskey;"/>
  380.         </menupopup>
  381.       </menu>
  382. -->
  383.       <menuitem id="menu_delete"/>
  384.       <menuseparator id="edEditMenuSep2" />
  385.       <menuitem id="menu_selectAll"/>
  386.       <menuseparator id="sep_find"/>
  387.       <menuitem id="menu_find"           accesskey="&editfind.accesskey;"            key="findkb"         observes="cmd_find" label="&findCmd.label;"/>
  388.       <menuitem id="menu_findnext"       accesskey="&editfindnext.accesskey;"        key="findnextkb"     observes="cmd_findNext"/>
  389.       <menuitem id="menu_findprev"       accesskey="&editfindprev.accesskey;"        key="findprevkb"     observes="cmd_findPrev"/>
  390.       <menuseparator id="sep_checkspelling"/>
  391.       <menuitem id="menu_checkspelling" accesskey="&editcheckspelling.accesskey;"
  392.                 key="checkspellingkb"   observes="cmd_spelling" disabled="true"
  393.                 label="&checkSpellingCmd.label;"/>
  394.       <menuseparator id="menu_prefsSep"/>
  395.       <menuitem id="menu_preferences"     observes="cmd_preferences"/>
  396.       <!-- Note: other Edit items (menu_validate, menu_publishSettings) are inserted from composerOverlay.xul -->
  397.     </menupopup>
  398.   </menu>
  399.  
  400.   <!-- view menu items -->
  401.   <menu id="menu_Toolbars" label="&viewToolbarsMenu.label;" accesskey="&viewToolbarsMenu.accesskey;">
  402.     <menupopup id="view_toolbars_popup"> 
  403.       <menuitem id="viewComposerToolbar" label="&compositionToolbarCmd.label;" type="checkbox" accesskey="&compositiontb.accesskey;" observes="cmd_viewCompToolbar"  />
  404.       <menuitem id="viewFormatToolbar"   label="&formattingToolbarCmd.label;"  type="checkbox" accesskey="&formattingtb.accesskey;"  observes="cmd_viewFormatToolbar" />
  405.       <menuitem id="viewEditModeToolbar" label="&editmodeToolbarCmd.label;"    type="checkbox" accesskey="&editmodetb.accesskey;"    observes="cmd_viewEditModeToolbar" />
  406.       <menuitem id="viewTaskBar"         label="&taskbarCmd.label;"            type="checkbox" accesskey="&taskbarCmd.accesskey;"    observes="cmd_viewtaskbar" />
  407.     </menupopup>
  408.   </menu>
  409.  
  410.   <menuitem id="viewNormalMode"   type="radio" group="mode" accesskey="&NormalMode.accesskey;"     observes="cmd_NormalMode"/>
  411.   <menuitem id="viewAllTagsMode"  type="radio" group="mode" accesskey="&AllTagsMode.accesskey;"    observes="cmd_AllTagsMode"/>
  412.   <menuitem id="viewSourceMode"   type="radio" group="mode" accesskey="&HTMLSourceMode.accesskey;" observes="cmd_HTMLSourceMode" label="&HTMLSourceMode.label;"/>
  413.   <menuitem id="viewPreviewMode"  type="radio" group="mode" accesskey="&PreviewMode.accesskey;"    observes="cmd_PreviewMode"/>
  414.  
  415.   <menupopup id = "composerCharsetMenuPopup"  onpopupshowing="updateCharsetPopupMenu(this)" />
  416.  
  417.   <!-- Insert menu -->
  418.   <menu id="insertMenu" label="&insertMenu.label;" accesskey="&insertmenu.accesskey;">
  419.     <menupopup id="insertMenuPopup">
  420.       <menuitem id="insertImage" accesskey="&insertimage.accesskey;"      observes="cmd_image"       label="&insertImageCmd.label;"/>
  421.       <menuitem id="insertTable" accesskey="&inserttable.accesskey;"      observes="cmd_InsertTable" label="&insertTableCmd.label;"/>
  422.       <menuitem id="insertLink" accesskey="&insertlink.accesskey;"       observes="cmd_link"        label="&insertLinkCmd.label;"   key="insertlinkkb"/>
  423.       <menuitem id="insertAnchor" accesskey="&insertanchor.accesskey;"     observes="cmd_anchor"      label="&insertAnchorCmd.label;"/>
  424.       <menuitem id="insertHline" accesskey="&inserthline.accesskey;"      observes="cmd_hline"       label="&insertHLineCmd.label;"/>
  425.       <menuitem id="insertHTMLSource" accesskey="&HTMLSourceMode.accesskey;"   observes="cmd_insertHTMLWithDialog"  key="inserthtmlkb"/>
  426.       <menuitem accesskey="&insertchars.accesskey;"      observes="cmd_insertChars" id="insertChars"/>
  427.       <menu id="insertTOC" label="&tocMenu.label;" accesskey="&tocMenu.accesskey;">
  428.         <menupopup onpopupshowing="InitTOCMenu()">
  429.           <menuitem id="insertTOCMenuitem"
  430.                     label="&insertTOC.label;"
  431.                     accesskey="&insertTOC.accesskey;"
  432.                     oncommand="UpdateTOC()"/>
  433.           <menuitem id="updateTOCMenuitem"
  434.                     label="&updateTOC.label;"
  435.                     accesskey="&updateTOC.accesskey;"
  436.                     oncommand="UpdateTOC()"/>
  437.           <menuitem id="removeTOCMenuitem"
  438.                     label="&removeTOC.label;"
  439.                     accesskey="&removeTOC.accesskey;"
  440.                     oncommand="RemoveTOC()"/>
  441.         </menupopup>
  442.       </menu>
  443.       <menuseparator id="insertMenuSeparator"/>
  444. <!-- Activate this after Enter key inserts P tag and not BR
  445.       <menuitem accesskey="&insertbreak.accesskey;"      observes="cmd_insertBreak"      label="&insertBreakCmd.label;"/>
  446. -->
  447.       <menuitem id="insertBreakAll" accesskey="&insertbreakall.accesskey;"   observes="cmd_insertBreakAll"   label="&insertBreakAllCmd.label;"/>
  448.     </menupopup>
  449.   </menu>
  450.     
  451.   <!-- Insert menu for PlainText editor -->
  452.   <menu id="insertMenuPlainText" label="&insertMenu.label;" accesskey="&insertmenu.accesskey;">
  453.     <menupopup>
  454.       <menuitem accesskey="&insertchars.accesskey;" observes="cmd_insertChars" />
  455.     </menupopup>
  456.   </menu>
  457.  
  458.   <!-- Format Menu -->
  459.   <menupopup id="formatMenuPopup" onpopupshowing="EditorInitFormatMenu()">
  460.     <!-- Font face submenu -->
  461.     <menu id="fontFaceMenu" label="&fontfaceMenu.label;" accesskey="&formatfontmenu.accesskey;" 
  462.           position="1">
  463.       <menupopup oncommand="if (event.target.localName == 'menuitem')
  464.                               doStatefulCommand('cmd_fontFace', event.target.getAttribute('value'));"
  465.                  onpopupshowing="initFontFaceMenu(this);">
  466.         <menuitem label="&fontVarWidth.label;"      accesskey="&fontvarwidth.accesskey;"    value=""    type="radio" name="1" observes="cmd_renderedHTMLEnabler"/>
  467.         <menuitem label="&fontFixedWidth.label;"    accesskey="&fontfixedwidth.accesskey;"  value="tt"  type="radio" name="1" observes="cmd_renderedHTMLEnabler"/>
  468.         <menuseparator/>
  469.         <menuitem label="&fontHelveticaFont.label;" accesskey="&fonthelvetica.accesskey;"   value="Helvetica, Arial, sans-serif"    type="radio" name="2" observes="cmd_renderedHTMLEnabler"/>
  470.         <menuitem label="&fontTimes.label;"         accesskey="&fonttimes.accesskey;"       value="Times New Roman, Times, serif"   type="radio" name="2" observes="cmd_renderedHTMLEnabler"/>
  471.         <menuitem label="&fontCourier.label;"       accesskey="&fontcourier.accesskey;"     value="Courier New, Courier, monospace" type="radio" name="2" observes="cmd_renderedHTMLEnabler"/>
  472.         <menuseparator/>
  473.           <!-- Local font face items added here by initLocalFontFaceMenu() -->
  474.       </menupopup>
  475.     </menu>
  476.  
  477.     <!-- Font size submenu -->
  478.     <menu id="fontSizeMenu" label="&fontsizeMenu.label;"
  479.           accesskey="&formatsizemenu.accesskey;" 
  480.           position="2">
  481.       <menupopup onpopupshowing="initFontSizeMenu(this)">
  482.       <menuitem label="&decreaseFontSize.label;" accesskey="&decreasefontsize.accesskey;" observes="cmd_decreaseFont" type="radio" name="1" key="decreasefontsizekb"/>
  483.       <menuitem label="&increaseFontSize.label;" accesskey="&increasefontsize.accesskey;" observes="cmd_increaseFont" type="radio" name="1" key="increasefontsizekb"/>
  484.         <menuseparator/>
  485. <!-- Not supported in current font size implementation
  486.         <menuitem label="&size-xx-smallCmd.label;" accesskey="&size-xx-small.accesskey;" oncommand="EditorSetFontSize('xx-small')" type="radio" name="2" />
  487. -->
  488.         <menuitem label="&size-x-smallCmd.label;"  accesskey="&size-x-small.accesskey;"  oncommand="EditorSetFontSize('x-small')"  type="radio" name="2" observes="cmd_renderedHTMLEnabler"/>
  489.         <menuitem label="&size-smallCmd.label;"    accesskey="&size-small.accesskey;"    oncommand="EditorSetFontSize('small')"    type="radio" name="2" observes="cmd_renderedHTMLEnabler"/>
  490.         <menuitem label="&size-mediumCmd.label;"   accesskey="&size-medium.accesskey;"   oncommand="EditorSetFontSize('medium')"   type="radio" name="2" observes="cmd_renderedHTMLEnabler"/>
  491.         <menuitem label="&size-largeCmd.label;"    accesskey="&size-large.accesskey;"    oncommand="EditorSetFontSize('large')"    type="radio" name="2" observes="cmd_renderedHTMLEnabler"/>
  492.         <menuitem label="&size-x-largeCmd.label;"  accesskey="&size-x-large.accesskey;"  oncommand="EditorSetFontSize('x-large')"  type="radio" name="2" observes="cmd_renderedHTMLEnabler"/>
  493.         <menuitem label="&size-xx-largeCmd.label;" accesskey="&size-xx-large.accesskey;" oncommand="EditorSetFontSize('xx-large')" type="radio" name="2" observes="cmd_renderedHTMLEnabler"/>
  494.       </menupopup>
  495.     </menu>
  496.  
  497.     <!-- Font style submenu -->
  498.     <menu id="fontStyleMenu" label="&fontStyleMenu.label;" 
  499.           accesskey="&formatstylemenu.accesskey;"
  500.           position="3">
  501.     <menupopup onpopupshowing="initFontStyleMenu(this)">
  502.       <menuitem label="&styleBoldCmd.label;"        accesskey="&stylebold.accesskey;"         observes="cmd_bold"          type="checkbox" key="boldkb"/>
  503.       <menuitem label="&styleItalicCmd.label;"      accesskey="&styleitalic.accesskey;"       observes="cmd_italic"        type="checkbox" key="italickb" />
  504.       <menuitem label="&styleUnderlineCmd.label;"   accesskey="&styleunderline.accesskey;"    observes="cmd_underline"     type="checkbox" key="underlinekb"/>
  505.       <menuitem label="&styleStrikeThruCmd.label;"  accesskey="&stylestrikethru.accesskey;"   observes="cmd_strikethrough" type="checkbox"/>
  506.       <menuitem label="&styleSuperscriptCmd.label;" accesskey="&stylesuperscript.accesskey;"  observes="cmd_superscript"   type="checkbox"/>
  507.       <menuitem label="&styleSubscriptCmd.label;"   accesskey="&stylesubscript.accesskey;"    observes="cmd_subscript"     type="checkbox"/>
  508.       <menuitem label="&fontFixedWidth.label;"      accesskey="&fontfixedwidth.accesskey;"    observes="cmd_tt"            type="checkbox" key="fixedwidthkb"/>
  509.       <menuitem label="&styleNonbreakingCmd.label;" accesskey="&stylenonbreaking.accesskey;"  observes="cmd_nobreak"       type="checkbox"/>
  510.       <menuseparator/>
  511.       <menuitem label="&styleEm.label;"             accesskey="&styleEm.accesskey;"           observes="cmd_em"            type="checkbox"/>
  512.       <menuitem label="&styleStrong.label;"         accesskey="&styleStrong.accesskey;"       observes="cmd_strong"        type="checkbox"/>
  513.       <menuitem label="&styleCite.label;"           accesskey="&styleCite.accesskey;"         observes="cmd_cite"          type="checkbox"/>
  514.       <menuitem label="&styleAbbr.label;"           accesskey="&styleAbbr.accesskey;"         observes="cmd_abbr"          type="checkbox"/>
  515.       <menuitem label="&styleAcronym.label;"        accesskey="&styleAcronym.accesskey;"      observes="cmd_acronym"       type="checkbox"/>
  516.       <menuitem label="&styleCode.label;"           accesskey="&styleCode.accesskey;"         observes="cmd_code"          type="checkbox"/>
  517.       <menuitem label="&styleSamp.label;"           accesskey="&styleSamp.accesskey;"         observes="cmd_samp"          type="checkbox"/>
  518.       <menuitem label="&styleVar.label;"            accesskey="&styleVar.accesskey;"          observes="cmd_var"           type="checkbox"/>
  519.     </menupopup>
  520.     </menu>
  521.     
  522.     <!-- Note: "cmd_fontColor" only monitors color state, it doesn't execute the command
  523.          (We should use "cmd_fontColorState" and "cmd_backgroundColorState" ?) -->
  524.     <menuitem id="fontColor" label="&formatFontColor.label;" 
  525.           accesskey="&formatfontcolor.accesskey;"
  526.           observes="cmd_fontColor"
  527.           oncommand="EditorSelectColor('Text', null);"
  528.           position="4"/>
  529.     <menuseparator id="removeSep" position="5"/>
  530.  
  531.     <!-- label and accesskey set at runtime from strings -->
  532.     <menuitem id="removeStylesMenuitem" key="removestyleskb"
  533.           observes="cmd_removeStyles"
  534.           position="6"/>
  535.     <menuitem id="removeLinksMenuitem" key="removelinkskb"
  536.           observes="cmd_removeLinks"
  537.           position="7"/>
  538.     <menuitem id="removeNamedAnchorsMenuitem"  label="&formatRemoveNamedAnchors.label;"
  539.           key="removenamedanchorskb"
  540.           accesskey="&formatRemoveNamedAnchors.accesskey;"
  541.           observes="cmd_removeNamedAnchors"
  542.           position="8"/>
  543.     <menuseparator id="tabSep" position="9"/>
  544.  
  545.     <!-- Note: the 'Init' menu methods for Paragraph, List, and Align
  546.          assume that the id = 'menu_'+tagName (the 'value' label),
  547.          except for the first ('none') item
  548.      -->
  549.     <!-- Paragraph Style submenu -->
  550.     <menu id="paragraphMenu" label="¶graphMenu.label;"
  551.           accesskey="&formatparagraphmenu.accesskey;"
  552.           position="10" onpopupshowing="InitParagraphMenu()">
  553.       <menupopup oncommand="doStatefulCommand('cmd_paragraphState', event.target.getAttribute('value'))">
  554.         <menuitem id="menu_bodyText"  type="radio" name="1" label="&bodyTextCmd.label;"             accesskey="&bodytext.accesskey;"            value=""      observes="cmd_renderedHTMLEnabler"/>
  555.         <menuitem id="menu_p"         type="radio" name="1" label="¶graphParagraphCmd.label;"   accesskey="¶graphparagraph.accesskey;"  value="p"     observes="cmd_renderedHTMLEnabler"/>
  556.         <menuitem id="menu_h1"        type="radio" name="1" label="&heading1Cmd.label;"             accesskey="&heading1.accesskey;"            value="h1"    observes="cmd_renderedHTMLEnabler"/>
  557.         <menuitem id="menu_h2"        type="radio" name="1" label="&heading2Cmd.label;"             accesskey="&heading2.accesskey;"            value="h2"    observes="cmd_renderedHTMLEnabler"/>
  558.         <menuitem id="menu_h3"        type="radio" name="1" label="&heading3Cmd.label;"             accesskey="&heading3.accesskey;"            value="h3"    observes="cmd_renderedHTMLEnabler"/>
  559.         <menuitem id="menu_h4"        type="radio" name="1" label="&heading4Cmd.label;"             accesskey="&heading4.accesskey;"            value="h4"    observes="cmd_renderedHTMLEnabler"/>
  560.         <menuitem id="menu_h5"        type="radio" name="1" label="&heading5Cmd.label;"             accesskey="&heading5.accesskey;"            value="h5"    observes="cmd_renderedHTMLEnabler"/>
  561.         <menuitem id="menu_h6"        type="radio" name="1" label="&heading6Cmd.label;"             accesskey="&heading6.accesskey;"            value="h6"    observes="cmd_renderedHTMLEnabler"/>
  562.         <menuitem id="menu_address"   type="radio" name="1" label="¶graphAddressCmd.label;"     accesskey="¶graphaddress.accesskey;"    value="address"  observes="cmd_renderedHTMLEnabler"/>   
  563.         <menuitem id="menu_pre"       type="radio" name="1" label="¶graphPreformatCmd.label;"   accesskey="¶graphpreformat.accesskey;"  value="pre"   observes="cmd_renderedHTMLEnabler"/>       
  564.       </menupopup>
  565.     </menu>
  566.  
  567.     <!-- List Style submenu -->
  568.     <menu id="listMenu" label="&formatlistMenu.label;"
  569.           accesskey="&formatlistmenu.accesskey;"
  570.           position="11" onpopupshowing="InitListMenu()">
  571.       <menupopup>
  572.         <menuitem id="menu_noList" type="radio" name="1" label="&noneCmd.label;"           accesskey="&none.accesskey;"           observes="cmd_removeList"/>
  573.         <menuitem id="menu_ul"     type="radio" name="1" label="&listBulletCmd.label;"     accesskey="&listbullet.accesskey;"     observes="cmd_ul"/>
  574.         <menuitem id="menu_ol"     type="radio" name="1" label="&listNumberedCmd.label;"   accesskey="&listnumbered.accesskey;"   observes="cmd_ol"/>
  575.         <menuitem id="menu_dt"     type="radio" name="1" label="&listTermCmd.label;"       accesskey="&listterm.accesskey;"       observes="cmd_dt"/>
  576.         <menuitem id="menu_dd"     type="radio" name="1" label="&listDefinitionCmd.label;" accesskey="&listdefinition.accesskey;" observes="cmd_dd"/>
  577.         <menuseparator/>
  578.         <menuitem id="listProps" label="&listProps.label;" accesskey="&listprops.accesskey;" observes="cmd_listProperties"/>
  579.       </menupopup>
  580.     </menu>
  581.     <menuseparator id="identingSep" position="12"/>
  582.  
  583.     <menuitem id="increaseIndent" label="&increaseIndent.label;"  accesskey="&increaseindent.accesskey;"  key="increaseindentkb"
  584.                 observes="cmd_indent" position="13"/>
  585.     <menuitem id="decreaseIndent" label="&decreaseIndent.label;"  accesskey="&decreaseindent.accesskey;"  key="decreaseindentkb"
  586.               observes="cmd_outdent"  position="14"/>
  587.  
  588.     <menu id="alignMenu" label="&alignMenu.label;" accesskey="&formatalignmenu.accesskey;"
  589.         onpopupshowing="InitAlignMenu()"
  590.         position="15">
  591.       <!-- Align submenu -->
  592.       <menupopup oncommand="doStatefulCommand('cmd_align', event.target.getAttribute('value'))">
  593.         <menuitem id="menu_left"    label="&alignLeft.label;"  accesskey="&alignleft.accesskey;"      type="radio" name="1" value="left"    observes="cmd_renderedHTMLEnabler"/>
  594.         <menuitem id="menu_center"  label="&alignCenter.label;"  accesskey="&aligncenter.accesskey;"  type="radio" name="1" value="center"  observes="cmd_renderedHTMLEnabler"/>
  595.         <menuitem id="menu_right"   label="&alignRight.label;"   accesskey="&alignright.accesskey;"   type="radio" name="1" value="right"   observes="cmd_renderedHTMLEnabler"/>
  596.         <menuitem id="menu_justify" label="&alignJustify.label;" accesskey="&alignjustify.accesskey;" type="radio" name="1" value="justify" observes="cmd_renderedHTMLEnabler"/>
  597.       </menupopup>
  598.     </menu>
  599.     <menuseparator id="tableSep" position="16"/>
  600.     <!-- Merge Table Menu and separator in Messenger Composer here -->
  601.     <!-- Merge property items here -->
  602.   </menupopup>
  603.  
  604.   <menuitem id="snapToGrid" label="&grid.label;" accesskey="&grid.accesskey;"
  605.             oncommand="goDoCommand('cmd_grid')"   observes="cmd_renderedHTMLEnabler"/>
  606.  
  607.   <!-- Next 3 are items to append at the bottom of the formatMenuPopup -->
  608.   <!-- label and accesskey filled in during menu creation -->
  609.   <menuitem id="objectProperties"   oncommand="goDoCommand('cmd_objectProperties')"   observes="cmd_renderedHTMLEnabler"/>
  610.   <!-- Dont use 'observes', must call command correctly -->
  611.   <menuitem id="pageProperties"       label="&pageProperties.label;"       accesskey="&pageproperties.accesskey;"      
  612.             oncommand="goDoCommand('cmd_pageProperties')"  observes="cmd_renderedHTMLEnabler"/>
  613.   <menuitem id="colorsAndBackground"  label="&colorsAndBackground.label;"  accesskey="&colorsandbackground.accesskey;"
  614.             oncommand="goDoCommand('cmd_colorProperties')" observes="cmd_renderedHTMLEnabler"/>
  615.  
  616.   <menu id="tableMenu" label="&tableMenu.label;" accesskey="&tablemenu.accesskey;">
  617.     <menupopup  onpopupshowing="EditorInitTableMenu()">
  618.       <!-- From EditorCommandOverlay.xul (shared with context popup) -->
  619.       <menu id="tableInsertMenu" label="&tableInsertMenu.label;" accesskey="&tableinsertmenu.accesskey;">
  620.         <menupopup>
  621.           <menuitem label="&insertTableCmd.label;"    accesskey="&tabletable.accesskey;"        observes="cmd_InsertTable"/>
  622.           <menuseparator />
  623.           <menuitem label="&tableRowAbove.label;"     accesskey="&tablerow.accesskey;"          observes="cmd_InsertRowAbove"/>
  624.           <menuitem label="&tableRowBelow.label;"     accesskey="&tablerowbelow.accesskey;"     observes="cmd_InsertRowBelow"/>
  625.           <menuseparator />
  626.           <menuitem label="&tableColumnBefore.label;" accesskey="&tablecolumn.accesskey;"       observes="cmd_InsertColumnBefore"/>
  627.           <menuitem label="&tableColumnAfter.label;"  accesskey="&tablecolumnafter.accesskey;"  observes="cmd_InsertColumnAfter"/>
  628.           <menuseparator />
  629.           <menuitem label="&tableCellBefore.label;"   accesskey="&tablecell.accesskey;"         observes="cmd_InsertCellBefore"/>
  630.           <menuitem label="&tableCellAfter.label;"    accesskey="&tablecellafter.accesskey;"    observes="cmd_InsertCellAfter"/>
  631.         </menupopup>
  632.       </menu>
  633.       <menu id="tableSelectMenu" label="&tableSelectMenu.label;" accesskey="&tableselectmenu.accesskey;">
  634.         <menupopup id="tableSelectPopup">
  635.           <menuitem id="menu_SelectTable"    label="&tableTable.label;"    accesskey="&tabletable.accesskey;"    observes="cmd_SelectTable"    />
  636.           <menuitem id="menu_SelectRow"      label="&tableRow.label;"      accesskey="&tablerow.accesskey;"      observes="cmd_SelectRow"      />
  637.           <menuitem id="menu_SelectColumn"   label="&tableColumn.label;"   accesskey="&tablecolumn.accesskey;"   observes="cmd_SelectColumn"   />
  638.           <menuitem id="menu_SelectCell"     label="&tableCell.label;"     accesskey="&tablecell.accesskey;"     observes="cmd_SelectCell"     />
  639.           <menuitem id="menu_SelectAllCells" label="&tableAllCells.label;" accesskey="&tableallcells.accesskey;" observes="cmd_SelectAllCells" />
  640.         </menupopup>
  641.       </menu>
  642.       <menu id="tableDeleteMenu" label="&tableDeleteMenu.label;" accesskey="&tabledeletemenu.accesskey;">
  643.         <menupopup id="tableDeletePopup">
  644.           <menuitem id="menu_DeleteTable"         label="&tableTable.label;"        accesskey="&tabletable.accesskey;"          observes="cmd_DeleteTable"/>
  645.           <menuitem id="menu_DeleteRow"           label="&tableRows.label;"         accesskey="&tablerow.accesskey;"            observes="cmd_DeleteRow"/>
  646.           <menuitem id="menu_DeleteColumn"        label="&tableColumns.label;"      accesskey="&tablecolumn.accesskey;"         observes="cmd_DeleteColumn"/>
  647.           <menuitem id="menu_DeleteCell"          label="&tableCells.label;"        accesskey="&tablecell.accesskey;"           observes="cmd_DeleteCell"/>
  648.           <menuitem id="menu_DeleteCellContents"  label="&tableCellContents.label;" accesskey="&tablecellcontents.accesskey;"   observes="cmd_DeleteCellContents"/>
  649.         </menupopup>
  650.       </menu>
  651.       <menuseparator />
  652.       <!-- menu label is set in InitTableMenu -->
  653.       <menuitem id="menu_JoinTableCells"   label="&tableJoinCells.label;"   accesskey="&tablejoincells.accesskey;"   observes="cmd_JoinTableCells"/>
  654.       <menuitem id="menu_SlitTableCell"    label="&tableSplitCell.label;"   accesskey="&tablesplitcell.accesskey;"   observes="cmd_SplitTableCell"/>
  655.       <menuitem id="menu_ConvertToTable"   label="&convertToTable.label;"   accesskey="&converttotable.accesskey;"   observes="cmd_ConvertToTable"/>
  656.       <menuseparator />
  657.       <menuitem id="menu_TableOrCellColor" label="&tableOrCellColor.label;" accesskey="&tableOrCellColor.accesskey;" observes="cmd_TableOrCellColor"/>
  658.       <menuitem id="menu_tableProperties"  label="&tableProperties.label;"  accesskey="&tableProperties.accesskey;"  observes="cmd_editTable"/>
  659.     </menupopup>
  660.   </menu>
  661.  
  662.   <!-- this is only used in messengercompose.xul -->
  663.   <toolbarbutton type="menu" id="AlignPopupButton" observes="cmd_align"
  664.               tooltiptext="&AlignPopupButton.tooltip;">
  665.     <menupopup id="AlignPopup">
  666.       <menuitem id="AlignLeftItem" class="menuitem-iconic" label="&alignLeft.label;"
  667.                 oncommand="doStatefulCommand('cmd_align', 'left')"/>
  668.       <menuitem id="AlignCenterItem" class="menuitem-iconic" label="&alignCenter.label;"
  669.                 oncommand="doStatefulCommand('cmd_align', 'center')"/>
  670.       <menuitem id="AlignRightItem" class="menuitem-iconic" label="&alignRight.label;"
  671.                 oncommand="doStatefulCommand('cmd_align', 'right')"/>
  672.       <menuitem id="AlignJustifyItem" class="menuitem-iconic" label="&alignJustify.label;"
  673.                 oncommand="doStatefulCommand('cmd_align', 'justify')"/>
  674.     </menupopup>
  675.   </toolbarbutton>
  676.  
  677.   <!-- InsertPopupButton is used by messengercompose.xul -->
  678.   <toolbarbutton type="menu" id="InsertPopupButton" observes="cmd_renderedHTMLEnabler"
  679.               tooltiptext="&InsertPopupButton.tooltip;">
  680.     <menupopup id="InsertPopup">
  681.       <menuitem id="InsertLinkItem" class="menuitem-iconic" observes="cmd_link"
  682.                 oncommand="goDoCommand('cmd_link')" label="&linkToolbarCmd.label;"/>
  683.       <menuitem id="InsertAnchorItem" class="menuitem-iconic" observes="cmd_anchor"
  684.                 oncommand="goDoCommand('cmd_anchor')" label="&anchorToolbarCmd.label;"/>
  685.       <menuitem id="InsertImageItem"  class="menuitem-iconic" observes="cmd_image"
  686.                 oncommand="goDoCommand('cmd_image')" label="&imageToolbarCmd.label;"/>
  687.       <menuitem id="InsertHRuleItem"  class="menuitem-iconic" observes="cmd_hline"
  688.                 oncommand="goDoCommand('cmd_hline')" label="&hruleToolbarCmd.label;"/>
  689.       <menuitem id="InsertTableItem"  class="menuitem-iconic" observes="cmd_table"
  690.                 oncommand="goDoCommand('cmd_table')" label="&tableToolbarCmd.label;"/>
  691.     </menupopup>
  692.   </toolbarbutton>
  693.  
  694.   <!-- Editor toolbar items -->
  695.   <!-- note that we override the submenu item label "Blank Window" with "New" used for the menu -->
  696.   <toolbarbutton id="newButton" class="toolbarbutton-1"
  697.                  label="&newMenu.label;" command="cmd_newEditor"
  698.                  tooltiptext="&newToolbarCmd.tooltip;"/>
  699.   <toolbarbutton id="openButton" class="toolbarbutton-1"
  700.                  label="&openToolbarCmd.label;" observes="cmd_open"
  701.                  tooltiptext="&openToolbarCmd.tooltip;"/>
  702.   <toolbarbutton id="saveButton" class="toolbarbutton-1" observes="cmd_save"
  703.                  tooltiptext="&saveToolbarCmd.tooltip;"/>
  704.   <toolbarbutton id="publishButton" class="toolbarbutton-1"
  705.                  observes="cmd_publish"
  706.                  tooltiptext="&publishToolbarCmd.tooltip;"/>
  707.   <toolbarbutton id="previewButton" class="toolbarbutton-1"
  708.                  label="&previewToolbarCmd.label;" observes="cmd_preview"
  709.                  tooltiptext="&previewToolbarCmd.tooltip;"/>
  710.   <toolbarbutton id="cutButton" class="toolbarbutton-1"
  711.                  label="&cutCmd.label;" command="cmd_cut"
  712.                  tooltiptext="&cutCmd.label;"/>
  713.   <toolbarbutton id="copyButton" class="toolbarbutton-1"
  714.                  label="©Cmd.label;" command="cmd_copy"
  715.                  tooltiptext="©Cmd.label;"/>
  716.   <toolbarbutton id="pasteButton" class="toolbarbutton-1"
  717.                  label="&pasteCmd.label;" command="cmd_paste"
  718.                  tooltiptext="&pasteCmd.label;"/>
  719.  
  720.   <toolbarbutton id="printButton" type="menu-button" class="toolbarbutton-1"
  721.                  label="&printToolbarCmd.label;"
  722.                  tooltiptext="&printToolbarCmd.tooltip;"
  723.                  oncommand="if (event.target==this) goDoCommand('cmd_print');">
  724.     <menupopup id="printMenu">
  725.       <menuitem id="printMenuItemToolbar" accesskey="&fileprint.accesskey;" label="&printCmd.label;" default="true"
  726.                 oncommand="goDoCommand('cmd_print');"/>
  727.       <!-- 'printSetupToolbar' is merged in here from platformGlobalOverlay.xul -->
  728.     </menupopup>
  729.   </toolbarbutton>
  730.     
  731.   <toolbarbutton id="findButton" class="toolbarbutton-1"
  732.                  label="&findToolbarCmd.label;" observes="cmd_find"
  733.                  tooltiptext="&findToolbarCmd.tooltip;"/>
  734.   <toolbarbutton id="spellingButton" class="toolbarbutton-1" disabled="true"
  735.                  label="&spellToolbarCmd.label;" observes="cmd_spelling"
  736.                  tooltiptext="&spellToolbarCmd.tooltip;"/>
  737.   <toolbarbutton id="imageButton" class="toolbarbutton-1"
  738.                  label="&imageToolbarCmd.label;" observes="cmd_image"
  739.                  tooltiptext="&imageToolbarCmd.tooltip;"/>
  740.   <toolbarbutton id="hlineButton" class="toolbarbutton-1"
  741.                  label="&hruleToolbarCmd.label;" observes="cmd_hline"
  742.                  tooltiptext="&hruleToolbarCmd.tooltip;"/>
  743.   <toolbarbutton id="tableButton" class="toolbarbutton-1"
  744.                  label="&tableToolbarCmd.label;" observes="cmd_table"
  745.                  tooltiptext="&tableToolbarCmd.tooltip;"/>
  746.   <toolbarbutton id="linkButton" class="toolbarbutton-1"
  747.                  label="&linkToolbarCmd.label;" observes="cmd_link"
  748.                  tooltiptext="&linkToolbarCmd.tooltip;"/>
  749.   <toolbarbutton id="namedAnchorButton" class="toolbarbutton-1"
  750.                  label="&anchorToolbarCmd.label;" observes="cmd_anchor"
  751.                  tooltiptext="&anchorToolbarCmd.tooltip;"/>
  752.  
  753.   <!-- Formatting toolbar items. "value" are HTML tagnames, don't translate -->
  754.   <menulist class="toolbar-focustarget" id="ParagraphSelect" observes="cmd_renderedHTMLEnabler"
  755.     tooltiptext="&ParagraphSelect.tooltip;" crop="right">
  756.     <observes element="cmd_paragraphState" attribute="state" onbroadcast="onParagraphFormatChange(this.parentNode, 'cmd_paragraphState')"/>
  757.     <menupopup id="ParagraphPopup" oncommand="doStatefulCommand('cmd_paragraphState', event.target.value)">
  758.       <menuitem label="&bodyTextCmd.label;"            value=""/>
  759.       <menuitem label="¶graphParagraphCmd.label;"  value="p"/>
  760.       <menuitem label="&heading1Cmd.label;"            value="h1"/>
  761.       <menuitem label="&heading2Cmd.label;"            value="h2"/>
  762.       <menuitem label="&heading3Cmd.label;"            value="h3"/>
  763.       <menuitem label="&heading4Cmd.label;"            value="h4"/>
  764.       <menuitem label="&heading5Cmd.label;"            value="h5"/>
  765.       <menuitem label="&heading6Cmd.label;"            value="h6"/>
  766.       <menuitem label="¶graphAddressCmd.label;"    value="address"/>
  767.       <menuitem label="¶graphPreformatCmd.label;"  value="pre"/>
  768.     </menupopup>
  769.   </menulist>
  770.  
  771.   <!-- "value" are HTML tagnames, don't translate -->
  772.   <menulist class="toolbar-focustarget" id="FontFaceSelect" observes="cmd_renderedHTMLEnabler"
  773.     tooltiptext="&FontFaceSelect.tooltip;" crop="right">
  774.     <observes element="cmd_fontFace" attribute="state" onbroadcast="onFontFaceChange(this.parentNode, 'cmd_fontFace')"/>
  775.     <menupopup id="FontFacePopup" oncommand="doStatefulCommand('cmd_fontFace', event.target.value)">
  776.       <menuitem label="&fontVarWidth.label;"      value=""/>
  777.       <menuitem label="&fontFixedWidth.label;"    value="tt"/>
  778.       <menuseparator/>
  779.       <menuitem label="&fontHelveticaFont.label;" value="Helvetica, Arial, sans-serif"/>
  780.       <menuitem label="&fontTimes.label;"         value="Times New Roman, Times, serif"/>
  781.       <menuitem label="&fontCourier.label;"       value="Courier New, Courier, monospace"/>
  782.       <menuseparator/>
  783.     </menupopup>
  784.   </menulist>  
  785.   
  786.   <menulist class="toolbar-focustarget" id="FontSizeSelect" oncommand="EditorSelectFontSize()"  tooltiptext="&FontSizeSelect.tooltip;" crop="right">
  787.     <observes element="cmd_fontSize" attribute="state" onbroadcast="onFontSizeChange(this.parentNode, 'cmd_fontSize')"/>
  788.     <menupopup>
  789.       <menuitem label="&size-xx-smallCmd.label;"/>
  790.       <menuitem label="&size-x-smallCmd.label;"/>
  791.       <menuitem label="&size-smallCmd.label;"/>
  792.       <menuitem label="&size-mediumCmd.label;"/>
  793.       <menuitem label="&size-largeCmd.label;"/>
  794.       <menuitem label="&size-x-largeCmd.label;"/>
  795.       <menuitem label="&size-xx-largeCmd.label;"/>
  796.     </menupopup>
  797.   </menulist>          
  798.  
  799.   <stack id="ColorButtons" align="center">
  800.     <observes element="cmd_fontColor"       attribute="state" onbroadcast="onFontColorChange()"/>
  801.     <observes element="cmd_backgroundColor" attribute="state" onbroadcast="onBackgroundColorChange()"/>
  802.     <box class="color-button" id="BackgroundColorButton"
  803.           onclick="EditorSelectColor('', event);"
  804.           tooltiptext="&BackgroundColorButton.tooltip;"/>
  805.     <box class="color-button" id="TextColorButton"
  806.           onclick="EditorSelectColor('Text', event);"
  807.           tooltiptext="&TextColorButton.tooltip;"/>
  808.   </stack>
  809.   <toolbarbutton id="HighlightColorButton" tooltip="aTooltip"
  810.           tooltiptext="&HighlightColorButton.tooltip;" command="cmd_highlight">
  811.     <observes element="cmd_highlight" attribute="state" onbroadcast="onHighlightColorChange()"/>
  812.     <observes element="cmd_highlight" attribute="collapsed"/>
  813.   </toolbarbutton>
  814.  
  815. <!-- A BUG IN CSS/BOXES MAKES THIS ASSERT WHEN CLASS= IS PRESENT AND WE TRY TO COLLAPSE THE TOOLBOX -->
  816.   <toolbarbutton id="DecreaseFontSizeButton" observes="cmd_decreaseFont"
  817.           tooltiptext="&decreaseFontSizeToolbarCmd.tooltip;"/>
  818.   <toolbarbutton id="IncreaseFontSizeButton" observes="cmd_increaseFont"
  819.           tooltiptext="&increaseFontSizeToolbarCmd.tooltip;"/>
  820.  
  821.   <toolbarbutton id="boldButton" type="checkbox" autoCheck="false" observes="cmd_bold"
  822.           tooltiptext="&boldToolbarCmd.tooltip;">
  823.     <observes element="cmd_bold" type="checkbox" attribute="state" onbroadcast="onButtonUpdate(this.parentNode, 'cmd_bold')"/>
  824.   </toolbarbutton>
  825.   <toolbarbutton id="italicButton" type="checkbox" autoCheck="false" observes="cmd_italic"
  826.           tooltiptext="&italicToolbarCmd.tooltip;">
  827.     <observes element="cmd_italic" attribute="state" onbroadcast="onButtonUpdate(this.parentNode, 'cmd_italic')"/>
  828.   </toolbarbutton>
  829.   <toolbarbutton id="underlineButton" type="checkbox" autoCheck="false" observes="cmd_underline"
  830.           tooltiptext="&underlineToolbarCmd.tooltip;">
  831.     <observes element="cmd_underline" attribute="state" onbroadcast="onButtonUpdate(this.parentNode, 'cmd_underline')"/>
  832.   </toolbarbutton>
  833.  
  834.   <toolbarbutton id="ulButton" type="radio" group="lists" autoCheck="false" observes="cmd_ul"
  835.           tooltiptext="&bulletListToolbarCmd.tooltip;">
  836.       <observes element="cmd_ul" attribute="state" onbroadcast="onButtonUpdate(this.parentNode, 'cmd_ul')"/>
  837.   </toolbarbutton>
  838.  
  839.   <toolbarbutton id="olButton" type="radio" group="lists" autoCheck="false" observes="cmd_ol"
  840.           tooltiptext="&numberListToolbarCmd.tooltip;">
  841.       <observes element="cmd_ol" attribute="state" onbroadcast="onButtonUpdate(this.parentNode, 'cmd_ol')"/>
  842.   </toolbarbutton>
  843.  
  844.   <toolbarbutton id="outdentButton" observes="cmd_outdent"
  845.           tooltiptext="&outdentToolbarCmd.tooltip;"/>
  846.   <toolbarbutton id="indentButton" observes="cmd_indent"
  847.           tooltiptext="&indentToolbarCmd.tooltip;"/>
  848.  
  849.   <!-- alignment buttons -->
  850.   <toolbarbutton id="align-left-button" type="radio" group="align" autoCheck="false"
  851.                  oncommand="doStatefulCommand('cmd_align', 'left')"
  852.                  tooltiptext="&alignLeft.tooltip;" >
  853.     <observes element="cmd_align" attribute="state" 
  854.               onbroadcast="onStateButtonUpdate(this.parentNode, 'cmd_align', 'left')" />
  855.   </toolbarbutton>
  856.   <toolbarbutton id="align-center-button" type="radio" group="align" autoCheck="false"
  857.                  oncommand="doStatefulCommand('cmd_align', 'center')"
  858.                  tooltiptext="&alignCenter.tooltip;" >
  859.     <observes element="cmd_align" attribute="state" 
  860.               onbroadcast="onStateButtonUpdate(this.parentNode, 'cmd_align', 'center')"/>
  861.   </toolbarbutton>
  862.   <toolbarbutton id="align-right-button" type="radio" group="align" autoCheck="false"
  863.                  oncommand="doStatefulCommand('cmd_align', 'right')"
  864.                  tooltiptext="&alignRight.tooltip;" >
  865.     <observes element="cmd_align" attribute="state"
  866.               onbroadcast="onStateButtonUpdate(this.parentNode, 'cmd_align', 'right')"/>
  867.   </toolbarbutton>
  868.   <toolbarbutton id="align-justify-button" type="radio" group="align" autoCheck="false"
  869.                  oncommand="doStatefulCommand('cmd_align', 'justify')"
  870.                  tooltiptext="&alignJustify.tooltip;" >
  871.     <observes element="cmd_align" attribute="state"
  872.               onbroadcast="onStateButtonUpdate(this.parentNode, 'cmd_align', 'justify')"/>
  873.   </toolbarbutton>
  874.   
  875.   <toolbarbutton id="absolutePositionButton" type="checkbox" tooltiptext="&layer.tooltip;" observes="cmd_absPos">
  876.     <observes element="cmd_absPos" attribute="state" onbroadcast="onStateButtonUpdate(this.parentNode, 'cmd_absPos', 'absolute')"/>
  877.   </toolbarbutton>
  878.   <toolbarbutton id="decreaseZIndexButton" observes="cmd_decreaseZIndex"
  879.                  tooltiptext="&layerSendToBack.tooltip;"/>
  880.   <toolbarbutton id="increaseZIndexButton" observes="cmd_increaseZIndex"
  881.                  tooltiptext="&layerBringToFront.tooltip;"/>
  882.  
  883.   <!-- Edit Mode toolbar -->
  884.   <tab id="NormalModeButton"   class="tab-bottom edit-mode _plain" type="text" selected="1" label="&NormalModeTab.label;"  oncommand="goDoCommand('cmd_NormalMode');"
  885.           tooltiptext="&NormalMode.tooltip;"/>
  886.   <tab id="TagModeButton"      class="tab-bottom edit-mode _plain" type="text" selected="0" label="&AllTagsMode.label;"    oncommand="goDoCommand('cmd_AllTagsMode');"
  887.           tooltiptext="&AllTagsMode.tooltip;"/>
  888.   <tab id="SourceModeButton"   class="tab-bottom edit-mode _plain" type="text" selected="0" label="&SourceMode.label;"     oncommand="goDoCommand('cmd_HTMLSourceMode');"
  889.           tooltiptext="&HTMLSourceMode.tooltip;" dir="&SourceTabDirection;"/>
  890.   <tab id="PreviewModeButton"  class="tab-bottom edit-mode _plain" type="text" selected="0" label="&PreviewMode.label;"    oncommand="goDoCommand('cmd_PreviewMode');"
  891.           tooltiptext="&PreviewMode.tooltip;"/>
  892.  
  893.   <!-- Paste as quotation is used by mail compose,
  894.        but in composer it has to go in the debug menu
  895.    -->
  896.   <menuitem id="menu_pasteQuote" accesskey="&editpastequotation.accesskey;" observes="cmd_pasteQuote"/>
  897.  
  898.   <!-- DEBUG only -->
  899.   <menu id="debugMenu" label="&debugMenu.label;">
  900.   <menupopup>
  901.     <menuitem label="&newEditorTestPage.label;" oncommand="window.openDialog('chrome://editor/content','_blank','chrome,all,dialog=no','chrome://editor/content/EditorInitPage.html')"/>
  902.     <menuitem label="&textEditorCmd.label;"     oncommand="EditorNewPlaintext();" />
  903.     <menuitem label="&outputTextCmd.label;"
  904.            oncommand="EditorGetText()"/>
  905.     <menuitem label="&outputHTMLCmd.label;"
  906.            oncommand="EditorGetHTML()"/>
  907.     <menuseparator />
  908.     <menuitem label="&pasteAsQuotationCmd.label;"
  909.            accesskey="&editpastequotation.accesskey;"
  910.            oncommand="goDoCommand('cmd_pasteQuote')"/>
  911.     <menuitem label="&editRewrapCmd.label;"
  912.            oncommand="try { GetCurrentEditor().rewrap(true); } catch (e) {}"/>
  913.     <menuitem label="&editStripQuotesCmd.label;"
  914.            oncommand="try { GetCurrentEditor().stripCites(); } catch (e) {}"/>
  915.     <menuitem label="&insertTextCmd.label;"
  916.            oncommand="EditorInsertText('All good things come to those who wait. ')"/>
  917.     <menuitem id="menu_checkLinks" observes="cmd_checkLinks"
  918.      label="&checkLinksCmd.label;"/>
  919.     <menuseparator />
  920.       <menu     accesskey="&insertformmenu.accesskey;"   id="insertFormMenu"        label="&insertFormMenu.label;">
  921.         <menupopup>
  922.           <menuitem accesskey="&insertform.accesskey;"        command="cmd_form"        label="&insertFormCmd.label;"/>
  923.           <menuseparator/>
  924.           <menuitem accesskey="&insertinputtag.accesskey;"    command="cmd_inputtag"    label="&insertInputTagCmd.label;"/>
  925.           <menuitem accesskey="&insertinputimage.accesskey;"  command="cmd_inputimage"  label="&insertInputImageCmd.label;"/>
  926.           <menuitem accesskey="&inserttextarea.accesskey;"    command="cmd_textarea"    label="&insertTextAreaCmd.label;"/>
  927.           <menuitem accesskey="&insertselect.accesskey;"      command="cmd_select"      label="&insertSelectCmd.label;"/>
  928.           <menuitem accesskey="&insertbutton.accesskey;"      command="cmd_button"      label="&insertButtonCmd.label;"/>
  929.           <menuitem accesskey="&insertlabel.accesskey;"       command="cmd_label"       label="&insertLabelCmd.label;"/>
  930.           <menuitem accesskey="&insertfieldset.accesskey;"    command="cmd_fieldset"    label="&insertFieldSetCmd.label;"/>
  931.           <menuseparator/>
  932.           <menuitem accesskey="&insertisindex.accesskey;"     command="cmd_isindex"     label="&insertIsIndexCmd.label;"/>
  933.         </menupopup>
  934.       </menu>
  935.     <menuitem label="&testSelectionCmd.label;"
  936.            oncommand="EditorTestSelection()"/>
  937.     <menuitem label="&testTableLayoutCmd.label;"
  938.            oncommand="EditorTestTableLayout()"/>
  939.     <menuitem label="&showEmbeddedCmd.label;"
  940.            oncommand="EditorShowEmbeddedObjects()"/>
  941.     <menuitem label="&dumpContentCmd.label;"
  942.            oncommand="EditorDumpContent()"/>
  943.     <menuitem label="&testDocumentCmd.label;"
  944.            oncommand="EditorTestDocument()"/>
  945.     <menuitem label="&runUnitTestsCmd.label;"
  946.            oncommand="EditorUnitTests()"/>
  947.     <menuseparator />
  948.     <menuitem label="&dumpUndoStack.label;"
  949.            oncommand="DumpUndoStack()"/>
  950.     <menuitem label="&dumpRedoStack.label;"
  951.            oncommand="DumpRedoStack()"/>
  952.     <menuitem label="&executeJSTransactionViaTxmgr.label;"
  953.            oncommand="ExecuteJSTransactionViaTxmgr()"/>
  954.     <menuitem label="&executeJSTransactionViaEditor.label;"
  955.            oncommand="ExecuteJSTransactionViaEditor()"/>
  956.     <menuseparator />
  957.     <menuitem label="&startLogCmd.label;"
  958.            oncommand="EditorStartLog()"/>
  959.     <menuitem label="&stopLogCmd.label;"
  960.            oncommand="EditorStopLog()"/>
  961.     <menuitem label="&runLogCmd.label;"
  962.            oncommand="EditorRunLog()"/>
  963.     <menuseparator />
  964.     <menuitem label="&setFocusCmd.label;"
  965.             accesskey="&toolsetfocus.accesskey;"
  966.             oncommand="window.focus()"/>
  967.   </menupopup>
  968.   </menu>
  969.   <!-- end DEBUG only -->
  970.  
  971. </overlay>
  972.