gecko/editor/ui/composer/content/editor.xul

312 lines
13 KiB
XML

<?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) 1999-2000
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Ben Goodger
- Michael Lowe
- Sammy Ford
-
- 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 ***** -->
<?xml-stylesheet href="chrome://editor/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://editor/skin/editorPrimaryToolbar.css" type="text/css"?>
<?xml-stylesheet href="chrome://editor/skin/editorFormatToolbar.css" type="text/css"?>
<?xml-stylesheet href="chrome://editor/skin/editorModeToolbar.css" type="text/css"?>
<?xul-overlay href="chrome://editor/content/editorOverlay.xul"?>
<?xul-overlay href="chrome://editor/content/composerOverlay.xul"?>
<?xul-overlay href="chrome://editor/content/EditorContextMenuOverlay.xul"?>
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<?xul-overlay href="chrome://global/content/charsetOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/contentAreaContextOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/sidebar/sidebarOverlay.xul"?>
<!DOCTYPE window [
<!ENTITY % editorDTD SYSTEM "chrome://editor/locale/editor.dtd" >
%editorDTD;
<!ENTITY % editorOverlayDTD SYSTEM "chrome://editor/locale/editorOverlay.dtd" >
%editorOverlayDTD;
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
%brandDTD;
]>
<window id="editorWindow"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="EditorOnLoad()"
onunload="EditorShutdown()"
onclose="return EditorCanClose()"
onfocus="EditorOnFocus()"
contenttitlesetting="true"
titlemodifier="&editorWindow.titlemodifier;"
titlemenuseparator="&editorWindow.titlemodifiermenuseparator;"
windowtype="composer:html"
width="640" height="480"
screenX="10" screenY="10"
persist="screenX screenY width height sizemode">
<script type="application/x-javascript" src="chrome://editor/content/editor.js"/>
<script type="application/x-javascript" src="chrome://editor/content/EditorContextMenu.js"/>
<script type="application/x-javascript" src="chrome://editor/content/StructBarContextMenu.js"/>
<script type="application/x-javascript" src="chrome://editor/content/editorApplicationOverlay.js"/>
<script type="application/x-javascript" src="chrome://editor/content/publishprefs.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaDD.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaClick.js"/>
<script type="application/x-javascript" src="chrome://global/content/printUtils.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
<popupset id="editorContentContextSet"/>
<popup id="sidebarPopup"/>
<popup id="popupNotificationMenu"/>
<commandset id="tasksCommands">
<commandset id="globalEditMenuItems"/>
<commandset id="selectEditMenuItems"/>
<commandset id="undoEditMenuItems"/>
<commandset id="clipboardEditMenuItems"/>
<commandset id="commonEditorMenuItems"/>
<commandset id="composerMenuItems"/>
<commandset id="composerEditMenuItems"/>
<commandset id="composerSaveMenuItems"/>
<commandset id="composerStyleMenuItems"/>
<commandset id="composerTableMenuItems"/>
<commandset id="composerListMenuItems"/>
<command id="toggleSidebar"/>
</commandset>
<tooltip id="aHTMLTooltip" onpopupshowing="return FillInHTMLTooltipEditor(this);"/>
<broadcaster id="args" value="about:blank"/>
<broadcaster id="canPrint"/>
<!-- Interim hack to transition from nsIXULWindowCallbacks/ShowWindowWithArgs
<broadcaster id="dialog.start" ready="false"/>
<observes element="dialog.start" attribute="ready" onbroadcast="EditorStartup('html')"/>
-->
<broadcasterset id="broadcasterset">
<broadcaster id="Editor:Throbber" busy="false"/>
<broadcaster id="Communicator:WorkMode"/>
</broadcasterset>
<!-- keys are appended from the overlay -->
<keyset id="editorKeys">
<keyset id="tasksKeys"/>
<key id="showHideSidebar"/>
<!-- eat these tab events here to stop focus from moving -->
<key keycode="VK_TAB" oncommand="return true;"/>
<key keycode="VK_TAB" modifiers="shift" oncommand="return true;"/>
<key keycode="VK_TAB" modifiers="control" oncommand="return true;"/>
<key keycode="VK_TAB" modifiers="control,shift" oncommand="return true;"/>
</keyset>
<toolbox class="toolbox-top" id="EditorToolbox">
<menubar id="main-menubar" class="chromeclass-menubar" persist="collapsed" grippytooltiptext="&menuBar.tooltip;">
<menu id="fileMenu"/>
<menu id="editMenu"/>
<menu id="viewMenu" label="&viewMenu.label;" accesskey="&viewmenu.accesskey;">
<!-- id pulls in "Show Sidebar" item from sidebarOverlay -->
<menupopup id="menu_View_Popup">
<menu id="menu_Toolbars">
<menupopup id="view_toolbars_popup">
<menuitem id="viewComposerToolbar" label="&compositionToolbarCmd.label;" type="checkbox" accesskey="&compositiontb.accesskey;" command="cmd_viewCompToolbar" />
<menuitem id="viewFormatToolbar" label="&formattingToolbarCmd.label;" type="checkbox" accesskey="&formattingtb.accesskey;" command="cmd_viewFormatToolbar" />
<menuitem id="viewEditModeToolbar" label="&editmodeToolbarCmd.label;" type="checkbox" accesskey="&editmodetb.accesskey;" command="cmd_viewEditModeToolbar" />
<menuitem id="viewTaskBar" label="&taskbarCmd.label;" type="checkbox" accesskey="&taskbarCmd.accesskey;" command="cmd_viewtaskbar" />
</menupopup>
</menu>
<menuseparator id="viewSep1"/>
<menuitem id="viewNormalMode" checked="true"/>
<menuitem id="viewAllTagsMode"/>
<menuitem id="viewSourceMode"/>
<menuitem id="viewPreviewMode"/>
<menuseparator id="viewSep1"/>
<menu id = "composerCharsetMenu" />
</menupopup>
</menu>
<menu id="insertMenu"/>
<menu id="formatMenu" label="&formatMenu.label;" accesskey="&formatmenu.accesskey;">
<menupopup id="formatMenuPopup">
<menuitem id="snapToGrid"/>
<menuseparator/>
<menuitem id="objectProperties"/>
<menuitem id="colorsAndBackground"/>
<menuitem id="pageProperties"/>
</menupopup>
</menu>
<menu id="tableMenu"/>
<!-- tasks menu filled from tasksOverlay -->
<menu id="tasksMenu">
<menupopup id="taskPopup">
<menuitem id="menu_validate" observes="cmd_validate"/>
<menuseparator id="sep_validate"/>
</menupopup>
</menu>
<menu id="windowMenu"/>
<!-- help menu filled from globalOverlay -->
<menu id="menu_Help"/>
<spacer flex="1"/>
</menubar>
<!-- toolbar filled out from editorOverlay -->
<!-- add class="standard" for dark blue background (icons need rework first) -->
<toolbar class="chromeclass-toolbar toolbar-primary" id="EditToolbar" persist="collapsed"
grippytooltiptext="&compositionToolbar.tooltip;">
<toolbarbutton id="newButton"/>
<toolbarbutton id="openButton"/>
<toolbarbutton id="saveButton"/>
<toolbarbutton id="publishButton"/>
<toolbarbutton id="previewButton"/>
<toolbarbutton id="cutButton"/>
<toolbarbutton id="copyButton"/>
<toolbarbutton id="pasteButton"/>
<toolbarbutton id="printButton"/>
<toolbarbutton id="findButton"/>
<toolbarseparator class="toolbarseparator-primary"/>
<toolbarbutton id="linkButton"/>
<toolbarbutton id="namedAnchorButton"/>
<toolbarbutton id="imageButton"/>
<toolbarbutton id="hlineButton"/>
<toolbarbutton id="tableButton"/>
<toolbarbutton id="spellingButton"/>
<spacer flex="1"/>
<hbox id="throbber-box" align="center">
<button id="navigator-throbber" oncommand="goClickThrobber('editor.throbber.url')" tooltiptext="&throbber.tooltip;">
<observes element="Editor:Throbber" attribute="busy"/>
</button>
</hbox>
</toolbar>
<toolbar class="chromeclass-toolbar" id="FormatToolbar" persist="collapsed" grippytooltiptext="&formatToolbar.tooltip;">
<!-- from editorOverlay -->
<menulist id="ParagraphSelect"/>
<stack id="ColorButtons"/>
<toolbarbutton id="HighlightColorButton"/>
<toolbarseparator class="toolbarseparator-standard"/>
<toolbarbutton id="DecreaseFontSizeButton"/>
<toolbarbutton id="IncreaseFontSizeButton"/>
<toolbarseparator class="toolbarseparator-standard"/>
<toolbarbutton id="boldButton"/>
<toolbarbutton id="italicButton"/>
<toolbarbutton id="underlineButton"/>
<toolbarseparator class="toolbarseparator-standard"/>
<toolbarbutton id="ulButton"/>
<toolbarbutton id="olButton"/>
<toolbarbutton id="outdentButton"/>
<toolbarbutton id="indentButton"/>
<toolbarseparator class="toolbarseparator-standard"/>
<toolbarbutton id="align-left-button"/>
<toolbarbutton id="align-center-button"/>
<toolbarbutton id="align-right-button"/>
<toolbarbutton id="align-justify-button"/>
<toolbarbutton id="absolutePositionButton"/>
<toolbarbutton id="decreaseZIndexButton"/>
<toolbarbutton id="increaseZIndexButton"/>
<!-- TODO: Change to a menulist? -->
<!-- menu>
<button id="AlignPopupButton"/>
<menupopup id="AlignmentPopup"/>
</menu -->
<spacer flex="1"/>
</toolbar>
</toolbox>
<!-- sidebar/toolbar/content/status -->
<hbox id="sidebar-parent" flex="1">
<!-- From sidebarOverlay.xul -->
<vbox id="sidebar-box" class="chromeclass-extrachrome" hidden="true"/>
<splitter id="sidebar-splitter" class="chromeclass-extrachrome" hidden="true"/>
<vbox id="appcontent" flex="1">
<deck id="ContentWindowDeck" selectedIndex="0" flex="1">
<!-- KLUDGE: Temporary fix for bug 34414:
The current editor tag doesn't have a view,
which breaks deck frame-hiding mechanism
-->
<stack>
<editor editortype="html" type="content-primary" id="content-frame"
context="editorContentContext" flex="1" tooltip="aHTMLTooltip"/>
</stack>
<vbox>
<label id="doctype-text" crop="right"/>
<editor type="content" id="content-source" context="editorSourceContext" flex="1"/>
</vbox>
</deck>
<hbox id="EditModeToolbar" align="center" hidden="false" persist="collapsed">
<tabs id="EditModeTabs" class="tabs-bottom" flex="1">
<tab id="NormalModeButton"/>
<tab id="TagModeButton"/>
<tab id="SourceModeButton"/>
<tab id="PreviewModeButton"/>
</tabs>
</hbox>
</vbox> <!-- appcontent -->
</hbox><!-- sidebar-parent -->
<!-- Some of this is from globarOverlay.xul -->
<statusbar class="chromeclass-status" id="status-bar">
<statusbarpanel id="component-bar"/>
<statusbarpanel id="structToolbar" flex="1" pack="end">
<label id="structSpacer" value="" flex="1"/>
</statusbarpanel>
<statusbarpanel class="statusbarpanel-iconic" id="offline-status"/>
</statusbar>
</window>