<?xml version="1.0"?> 
<!-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
   -
   - The contents of this file are subject to the Mozilla Public License Version
   - 1.1 (the "License"); you may not use this file except in compliance with
   - the License. You may obtain a copy of the License at
   - http://www.mozilla.org/MPL/
   -
   - Software distributed under the License is distributed on an "AS IS" basis,
   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   - for the specific language governing rights and limitations under the
   - License.
   -
   - The Original Code is Mozilla Communicator client code, released
   - March 31, 1998.
   -
   - The Initial Developer of the Original Code is
   - Netscape Communications Corporation.
   - Portions created by the Initial Developer are Copyright (C) 2000
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   -   Daniel Glazman (glazman@netscape.com)
   -   Charles Manske (cmanske@netscape.com)
   -
   - Alternatively, the contents of this file may be used under the terms of
   - either of the GNU General Public License Version 2 or later (the "GPL"),
   - or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
   - in which case the provisions of the GPL or the LGPL are applicable instead
   - of those above. If you wish to allow use of your version of this file only
   - under the terms of either the GPL or the LGPL, and not to allow others to
   - use your version of this file under the terms of the MPL, indicate your
   - decision by deleting the provisions above and replace them with the notice
   - and other provisions required by the GPL or the LGPL. If you do not delete
   - the provisions above, a recipient may use your version of this file under
   - the terms of any one of the MPL, the GPL or the LGPL.
   -
   - ***** END LICENSE BLOCK ***** -->

<!DOCTYPE overlay SYSTEM "chrome://editor/locale/editorOverlay.dtd">

<overlay id="ComposerContextMenuOverlay"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

<script type="application/javascript" src="chrome://editor/content/EditorContextMenu.js"/>
<script type="application/javascript" src="chrome://editor/content/StructBarContextMenu.js"/>
<script type="application/javascript" src="chrome://global/content/inlineSpellCheckUI.js"/>

  <menupopup id="contentAreaContextMenu"
             onpopupshowing="return event.target != this ||
                                    editorContextPopupShowing(this);">
    <menuitem id="menu_pasteNoFormatting_cm"
              insertafter="context-paste"
              command="cmd_pasteNoFormatting"/>
    
    <!-- label and accesskey set at runtime from strings -->
    <menuitem id="removeStylesMenuitem_cm"
              insertafter="context-sep-selectall"
              command="cmd_removeStyles"/>
    <menuitem id="createLink_cm"
              insertafter="removeStylesMenuitem_cm"
              label="&createLinkCmd.label;"
              accesskey="&createLinkCmd.accesskey;"
              command="cmd_link"/>
    <!-- label and accesskey set at runtime from strings -->
    <menuitem id="removeLinksMenuitem_cm"
              insertafter="createLink_cm"
              command="cmd_removeLinks"/>
    <menuitem id="removeNamedAnchorsMenuitem_cm"
              insertafter="removeLinksMenuitem_cm"
              label="&formatRemoveNamedAnchors.label;"
              accesskey="&formatRemoveNamedAnchors.accesskey;"
              command="cmd_removeNamedAnchors"/>

    <!-- label and accesskey are set in InitObjectProperties -->
    <menuitem id="objectProperties_cm"
              insertafter="context-sep-properties"
              command="cmd_objectProperties"/>
    <menuitem id="editLink_cm"
              insertafter="objectProperties_cm"
              label="&editLinkCmd.label;"
              accesskey="&editLinkCmd.accesskey;"
              command="cmd_editLink"/>

    <!-- Can't get submenus to load from a shared overlay -->
    <menu id="tableInsertMenu_cm"
          insertafter="frame-sep"
          label="&tableInsertMenu2.label;"
          accesskey="&tableInsertMenu2.accesskey;">
      <menupopup>
        <menuitem label="&insertTableCmd.label;"
                  accesskey="&insertTableCmd.accesskey;"
                  command="cmd_InsertTable"/>
        <menuseparator/>
        <menuitem label="&tableRowAbove.label;"
                  accesskey="&tableRowAbove.accesskey;"
                  command="cmd_InsertRowAbove"/>
        <menuitem label="&tableRowBelow.label;"
                  accesskey="&tableRowBelow.accesskey;"
                  command="cmd_InsertRowBelow"/>
        <menuseparator/>
        <menuitem label="&tableColumnBefore.label;"
                  accesskey="&tableColumnBefore.accesskey;"
                  command="cmd_InsertColumnBefore"/>
        <menuitem label="&tableColumnAfter.label;"
                  accesskey="&tableColumnAfter.accesskey;"
                  command="cmd_InsertColumnAfter"/>
        <menuseparator/>
        <menuitem label="&tableCellBefore.label;"
                  accesskey="&tableCellBefore.accesskey;"
                  command="cmd_InsertCellBefore"/>
        <menuitem label="&tableCellAfter.label;"
                  accesskey="&tableCellAfter.accesskey;"
                  command="cmd_InsertCellAfter"/>
      </menupopup>
    </menu>
    <menu id="tableSelectMenu_cm"
          insertafter="tableInsertMenu_cm"
          label="&tableSelectMenu2.label;"
          accesskey="&tableSelectMenu2.accesskey;">
      <menupopup>
        <menuitem id="menu_SelectTable_cm"
                  label="&tableTable.label;"
                  accesskey="&tableTable.accesskey;"
                  command="cmd_SelectTable"/>
        <menuitem id="menu_SelectRow_cm"
                  label="&tableRow.label;"
                  accesskey="&tableRow.accesskey;"
                  command="cmd_SelectRow"/>
        <menuitem id="menu_SelectColumn_cm"
                  label="&tableColumn.label;"
                  accesskey="&tableColumn.accesskey;"
                  command="cmd_SelectColumn"/>
        <menuitem id="menu_SelectCell_cm"
                  label="&tableCell.label;"
                  accesskey="&tableCell.accesskey;"
                  command="cmd_SelectCell"/>
        <menuitem id="menu_SelectAllCells_cm"
                  label="&tableAllCells.label;"
                  accesskey="&tableAllCells.accesskey;"
                  command="cmd_SelectAllCells"/>
      </menupopup>
    </menu>
    <menu id="tableDeleteMenu_cm"
          insertafter="tableSelectMenu_cm"
          label="&tableDeleteMenu2.label;"
          accesskey="&tableDeleteMenu2.accesskey;">
      <menupopup>
        <menuitem id="menu_DeleteTable_cm"
                  label="&tableTable.label;"
                  accesskey="&tableTable.accesskey;"
                  command="cmd_DeleteTable"/>
        <menuitem id="menu_DeleteRow_cm"
                  label="&tableRows.label;"
                  accesskey="&tableRow.accesskey;"
                  command="cmd_DeleteRow"/>
        <menuitem id="menu_DeleteColumn_cm"
                  label="&tableColumns.label;"
                  accesskey="&tableColumn.accesskey;"
                  command="cmd_DeleteColumn"/>
        <menuitem id="menu_DeleteCell_cm"
                  label="&tableCells.label;"
                  accesskey="&tableCell.accesskey;"
                  command="cmd_DeleteCell"/>
        <menuitem id="menu_DeleteCellContents_cm"
                  label="&tableCellContents.label;"
                  accesskey="&tableCellContents.accesskey;"
                  command="cmd_DeleteCellContents"/>
      </menupopup>
    </menu>
    <!-- menu label is set in InitTableMenu -->
    <menuitem id="joinTableCells_cm"
              insertafter="tableDeleteMenu_cm"
              label="&tableJoinCells.label;"
              accesskey="&tableJoinCells.accesskey;"
              command="cmd_JoinTableCells"/>
    <menuitem id="splitTableCell_cm"
              insertafter="joinTableCells_cm"
              label="&tableSplitCell.label;"
              accesskey="&tableSplitCell.accesskey;"
              command="cmd_SplitTableCell"/>
    <menuitem id="tableOrCellColor_cm"
              insertafter="splitTableCell_cm"
              label="&tableOrCellColor.label;"
              accesskey="&tableOrCellColor.accesskey;"
              command="cmd_TableOrCellColor"/>
  </menupopup>

 <menupopup id="structToolbarContext">
   <menuitem id="structSelect"     label="&structSelect.label;"
                                   accesskey="&structSelect.accesskey;"
                                   oncommand="StructSelectTag()"/>
   <menuseparator/>
   <menuitem id="structRemoveTag"  label="&structRemoveTag.label;"
                                   accesskey="&structRemoveTag.accesskey;"
                                   oncommand="StructRemoveTag()"/>
   <menuitem id="structChangeTag"  label="&structChangeTag.label;"
                                   accesskey="&structChangeTag.accesskey;"
                                   oncommand="StructChangeTag()"/>
   <menuseparator/>
   <menuitem id="advancedPropsTag" label="&advancedPropertiesCmd.label;"
                                   accesskey="&advancedPropertiesCmd.accesskey;"
                                   oncommand="OpenAdvancedProperties()"/>
 </menupopup>

</overlay>
