Bug 1571687 - copy the parts of editor that are used by Thunderbird to mail/components/compose. r=mkmelin,pike
authorKhushil Mistry <khushil324@gmail.com>
Tue, 10 Sep 2019 00:40:00 +0200
changeset 35898 2c47346623c48da709386b8dded13565ed627e1e
parent 35897 1e5703db8f099464f59a47855c2b847d8a48c98a
child 35899 d37caf20cf1f1ed626f2d87a6b125b300b2bf8d6
push id2511
push userclokep@gmail.com
push dateMon, 21 Oct 2019 20:28:27 +0000
treeherdercomm-beta@67169a456144 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin, pike
bugs1571687
Bug 1571687 - copy the parts of editor that are used by Thunderbird to mail/components/compose. r=mkmelin,pike
.eslintignore
mail/app.mozbuild
mail/components/compose/composer.js
mail/components/compose/content/ComposerCommands.js
mail/components/compose/content/EditorContent.css
mail/components/compose/content/MsgComposeCommands.js
mail/components/compose/content/dialogs/EdAEAttributes.js
mail/components/compose/content/dialogs/EdAECSSAttributes.js
mail/components/compose/content/dialogs/EdAEHTMLAttributes.js
mail/components/compose/content/dialogs/EdAEJSEAttributes.js
mail/components/compose/content/dialogs/EdAdvancedEdit.js
mail/components/compose/content/dialogs/EdAdvancedEdit.xul
mail/components/compose/content/dialogs/EdButtonProps.js
mail/components/compose/content/dialogs/EdButtonProps.xul
mail/components/compose/content/dialogs/EdColorPicker.js
mail/components/compose/content/dialogs/EdColorPicker.xul
mail/components/compose/content/dialogs/EdColorProps.js
mail/components/compose/content/dialogs/EdColorProps.xul
mail/components/compose/content/dialogs/EdConvertToTable.js
mail/components/compose/content/dialogs/EdConvertToTable.xul
mail/components/compose/content/dialogs/EdDialogCommon.js
mail/components/compose/content/dialogs/EdDictionary.js
mail/components/compose/content/dialogs/EdDictionary.xul
mail/components/compose/content/dialogs/EdFieldSetProps.js
mail/components/compose/content/dialogs/EdFieldSetProps.xul
mail/components/compose/content/dialogs/EdFormProps.js
mail/components/compose/content/dialogs/EdFormProps.xul
mail/components/compose/content/dialogs/EdHLineProps.js
mail/components/compose/content/dialogs/EdHLineProps.xul
mail/components/compose/content/dialogs/EdImageDialog.js
mail/components/compose/content/dialogs/EdImageLinkLoader.js
mail/components/compose/content/dialogs/EdImageProps.js
mail/components/compose/content/dialogs/EdImageProps.xul
mail/components/compose/content/dialogs/EdInputImage.js
mail/components/compose/content/dialogs/EdInputImage.xul
mail/components/compose/content/dialogs/EdInputProps.js
mail/components/compose/content/dialogs/EdInputProps.xul
mail/components/compose/content/dialogs/EdInsSrc.js
mail/components/compose/content/dialogs/EdInsSrc.xul
mail/components/compose/content/dialogs/EdInsertChars.js
mail/components/compose/content/dialogs/EdInsertChars.xul
mail/components/compose/content/dialogs/EdInsertMath.js
mail/components/compose/content/dialogs/EdInsertMath.xul
mail/components/compose/content/dialogs/EdInsertTOC.js
mail/components/compose/content/dialogs/EdInsertTOC.xul
mail/components/compose/content/dialogs/EdInsertTable.js
mail/components/compose/content/dialogs/EdInsertTable.xul
mail/components/compose/content/dialogs/EdLabelProps.js
mail/components/compose/content/dialogs/EdLabelProps.xul
mail/components/compose/content/dialogs/EdLinkProps.js
mail/components/compose/content/dialogs/EdLinkProps.xul
mail/components/compose/content/dialogs/EdListProps.js
mail/components/compose/content/dialogs/EdListProps.xul
mail/components/compose/content/dialogs/EdNamedAnchorProps.js
mail/components/compose/content/dialogs/EdNamedAnchorProps.xul
mail/components/compose/content/dialogs/EdPageProps.js
mail/components/compose/content/dialogs/EdPageProps.xul
mail/components/compose/content/dialogs/EdReplace.js
mail/components/compose/content/dialogs/EdReplace.xul
mail/components/compose/content/dialogs/EdSelectProps.js
mail/components/compose/content/dialogs/EdSelectProps.xul
mail/components/compose/content/dialogs/EdSpellCheck.js
mail/components/compose/content/dialogs/EdSpellCheck.xul
mail/components/compose/content/dialogs/EdTableProps.js
mail/components/compose/content/dialogs/EdTableProps.xul
mail/components/compose/content/dialogs/EdTextAreaProps.js
mail/components/compose/content/dialogs/EdTextAreaProps.xul
mail/components/compose/content/dialogs/edImage.inc.xul
mail/components/compose/content/editor.js
mail/components/compose/content/editorUtilities.js
mail/components/compose/content/images/tag-anchor.gif
mail/components/compose/content/messengercompose.xul
mail/components/compose/editorUtilities.jsm
mail/components/compose/jar.mn
mail/components/compose/moz.build
mail/components/compose/texzilla/TeXZilla.js
mail/components/preferences/doctype.inc.xul
mail/locales/Makefile.in
mail/locales/en-US/chrome/messenger/messengercompose/EdAdvancedEdit.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EdColorPicker.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EdConvertToTable.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EdDialogOverlay.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EdNamedAnchorProperties.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EditorButtonProperties.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EditorColorProperties.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EditorFieldSetProperties.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EditorFormProperties.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EditorHLineProperties.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EditorImageProperties.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EditorInputProperties.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EditorInsertChars.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EditorInsertMath.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EditorInsertSource.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EditorInsertTOC.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EditorInsertTable.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EditorLabelProperties.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EditorLinkProperties.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EditorListProperties.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EditorPersonalDictionary.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EditorReplace.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EditorSelectProperties.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EditorSpellCheck.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EditorTableProperties.dtd
mail/locales/en-US/chrome/messenger/messengercompose/EditorTextAreaProperties.dtd
mail/locales/en-US/chrome/messenger/messengercompose/editor.properties
mail/locales/en-US/chrome/messenger/messengercompose/editorOverlay.dtd
mail/locales/en-US/chrome/messenger/messengercompose/editorSmileyOverlay.dtd
mail/locales/filter.py
mail/locales/jar.mn
mail/locales/l10n-beta.ini
mail/locales/l10n-central.ini
mail/locales/l10n.ini
--- a/.eslintignore
+++ b/.eslintignore
@@ -71,16 +71,18 @@ mail/base/content/protovis-r2.6-modded.j
 mail/branding/nightly/thunderbird-branding.js
 mail/branding/thunderbird/thunderbird-branding.js
 # This file is split into two in order to keep it as a valid json file
 # for documentation purposes (policies.json) but to be accessed by the
 # code as a .jsm (schema.jsm)
 mail/components/enterprisepolicies/schemas/schema.jsm
 mail/components/im/all-im.js
 mail/locales/en-US/all-l10n.js
+mail/components/compose/texzilla/**
+mail/components/compose/composer.js
 
 # calendar/ exclusions
 
 # prefs files
 calendar/lightning/content/lightning.js
 calendar/providers/gdata/defaults/preferences.js
 calendar/timezones/preferences.js
 
--- a/mail/app.mozbuild
+++ b/mail/app.mozbuild
@@ -23,11 +23,10 @@ DIRS += ['/%s' % CONFIG['MOZ_BRANDING_DI
 if CONFIG['MOZ_CALENDAR']:
     DIRS += [
         '/%s/calendar/lightning' % CONFIG['commreltopsrcdir'],
         '/%s/calendar/providers/gdata' % CONFIG['commreltopsrcdir'],
     ]
 
 DIRS += [
     '/%s/chat' % CONFIG['commreltopsrcdir'],
-    '/%s/editor/ui' % CONFIG['commreltopsrcdir'],
     '/%s/mail' % CONFIG['commreltopsrcdir'],
 ]
copy from editor/ui/composer.js
copy to mail/components/compose/composer.js
copy from editor/ui/composer/content/ComposerCommands.js
copy to mail/components/compose/content/ComposerCommands.js
--- a/editor/ui/composer/content/ComposerCommands.js
+++ b/mail/components/compose/content/ComposerCommands.js
@@ -645,17 +645,17 @@ var nsSaveAndChangeEncodingCommand = {
   doCommandParams(aCommand, aParams, aRefCon) {},
 
   doCommand(aCommand) {
     SetEditMode(gPreviousNonSourceDisplayMode);
     window.ok = false;
     window.exportToText = false;
     var oldTitle = GetDocumentTitle();
     window.openDialog(
-      "chrome://editor/content/EditorSaveAsCharset.xul",
+      "chrome://messenger/content/messengercompose/EditorSaveAsCharset.xul",
       "_blank",
       "chrome,close,titlebar,modal,resizable=yes"
     );
 
     if (GetDocumentTitle() != oldTitle) {
       UpdateWindowTitle();
     }
 
@@ -715,17 +715,17 @@ var nsPublishCommand = {
       }
 
       if (showPublishDialog || !publishData) {
         // Show the publish dialog
         publishData = {};
         window.ok = false;
         let oldTitle = GetDocumentTitle();
         window.openDialog(
-          "chrome://editor/content/EditorPublish.xul",
+          "chrome://messenger/content/messengercompose/EditorPublish.xul",
           "_blank",
           "chrome,close,titlebar,modal",
           "",
           "",
           publishData
         );
         if (GetDocumentTitle() != oldTitle) {
           UpdateWindowTitle();
@@ -755,17 +755,17 @@ var nsPublishAsCommand = {
   doCommand(aCommand) {
     if (GetCurrentEditor()) {
       SetEditMode(gPreviousNonSourceDisplayMode);
 
       window.ok = false;
       var publishData = {};
       var oldTitle = GetDocumentTitle();
       window.openDialog(
-        "chrome://editor/content/EditorPublish.xul",
+        "chrome://messenger/content/messengercompose/EditorPublish.xul",
         "_blank",
         "chrome,close,titlebar,modal",
         "",
         "",
         publishData
       );
       if (GetDocumentTitle() != oldTitle) {
         UpdateWindowTitle();
@@ -2088,17 +2088,17 @@ function Publish(publishData) {
 
   try {
     // We launch dialog as a dependent
     // Don't allow editing document!
     SetDocumentEditable(false);
 
     // Start progress monitoring
     gProgressDialog = window.openDialog(
-      "chrome://editor/content/EditorPublishProgress.xul",
+      "chrome://messenger/content/messengercompose/EditorPublishProgress.xul",
       "_blank",
       "chrome,dependent,titlebar",
       gPublishData,
       gPersistObj
     );
   } catch (e) {}
 
   // Network transfer is often too quick for the progress dialog to be initialized
@@ -2253,17 +2253,17 @@ var nsPublishSettingsCommand = {
   getCommandStateParams(aCommand, aParams, aRefCon) {},
   doCommandParams(aCommand, aParams, aRefCon) {},
 
   doCommand(aCommand) {
     if (GetCurrentEditor()) {
       // Launch Publish Settings dialog
 
       window.ok = window.openDialog(
-        "chrome://editor/content/EditorPublishSettings.xul",
+        "chrome://messenger/content/messengercompose/EditorPublishSettings.xul",
         "_blank",
         "chrome,close,titlebar,modal",
         ""
       );
       return window.ok;
     }
     return false;
   },
@@ -2540,17 +2540,17 @@ var nsFindReplaceCommand = {
     return editorElement.getEditor(editorElement.contentWindow) != null;
   },
 
   getCommandStateParams(aCommand, aParams, editorElement) {},
   doCommandParams(aCommand, aParams, editorElement) {},
 
   doCommand(aCommand, editorElement) {
     window.openDialog(
-      "chrome://editor/content/EdReplace.xul",
+      "chrome://messenger/content/messengercompose/EdReplace.xul",
       "_blank",
       "chrome,modal,titlebar",
       editorElement
     );
   },
 };
 
 var nsFindCommand = {
@@ -2613,17 +2613,17 @@ var nsSpellingCommand = {
 
   doCommand(aCommand) {
     window.cancelSendMessage = false;
     try {
       var skipBlockQuotes =
         window.document.documentElement.getAttribute("windowtype") ==
         "msgcompose";
       window.openDialog(
-        "chrome://editor/content/EdSpellCheck.xul",
+        "chrome://messenger/content/messengercompose/EdSpellCheck.xul",
         "_blank",
         "dialog,close,titlebar,modal,resizable",
         false,
         skipBlockQuotes,
         true
       );
     } catch (ex) {}
   },
@@ -2690,102 +2690,102 @@ var nsFormCommand = {
     return IsDocumentEditable() && IsEditingRenderedHTML();
   },
 
   getCommandStateParams(aCommand, aParams, aRefCon) {},
   doCommandParams(aCommand, aParams, aRefCon) {},
 
   doCommand(aCommand) {
     window.openDialog(
-      "chrome://editor/content/EdFormProps.xul",
+      "chrome://messenger/content/messengercompose/EdFormProps.xul",
       "_blank",
       "chrome,close,titlebar,modal"
     );
   },
 };
 
 var nsInputTagCommand = {
   isCommandEnabled(aCommand, dummy) {
     return IsDocumentEditable() && IsEditingRenderedHTML();
   },
 
   getCommandStateParams(aCommand, aParams, aRefCon) {},
   doCommandParams(aCommand, aParams, aRefCon) {},
 
   doCommand(aCommand) {
     window.openDialog(
-      "chrome://editor/content/EdInputProps.xul",
+      "chrome://messenger/content/messengercompose/EdInputProps.xul",
       "_blank",
       "chrome,close,titlebar,modal"
     );
   },
 };
 
 var nsInputImageCommand = {
   isCommandEnabled(aCommand, dummy) {
     return IsDocumentEditable() && IsEditingRenderedHTML();
   },
 
   getCommandStateParams(aCommand, aParams, aRefCon) {},
   doCommandParams(aCommand, aParams, aRefCon) {},
 
   doCommand(aCommand) {
     window.openDialog(
-      "chrome://editor/content/EdInputImage.xul",
+      "chrome://messenger/content/messengercompose/EdInputImage.xul",
       "_blank",
       "chrome,close,titlebar,modal"
     );
   },
 };
 
 var nsTextAreaCommand = {
   isCommandEnabled(aCommand, dummy) {
     return IsDocumentEditable() && IsEditingRenderedHTML();
   },
 
   getCommandStateParams(aCommand, aParams, aRefCon) {},
   doCommandParams(aCommand, aParams, aRefCon) {},
 
   doCommand(aCommand) {
     window.openDialog(
-      "chrome://editor/content/EdTextAreaProps.xul",
+      "chrome://messenger/content/messengercompose/EdTextAreaProps.xul",
       "_blank",
       "chrome,close,titlebar,modal"
     );
   },
 };
 
 var nsSelectCommand = {
   isCommandEnabled(aCommand, dummy) {
     return IsDocumentEditable() && IsEditingRenderedHTML();
   },
 
   getCommandStateParams(aCommand, aParams, aRefCon) {},
   doCommandParams(aCommand, aParams, aRefCon) {},
 
   doCommand(aCommand) {
     window.openDialog(
-      "chrome://editor/content/EdSelectProps.xul",
+      "chrome://messenger/content/messengercompose/EdSelectProps.xul",
       "_blank",
       "chrome,close,titlebar,modal"
     );
   },
 };
 
 var nsButtonCommand = {
   isCommandEnabled(aCommand, dummy) {
     return IsDocumentEditable() && IsEditingRenderedHTML();
   },
 
   getCommandStateParams(aCommand, aParams, aRefCon) {},
   doCommandParams(aCommand, aParams, aRefCon) {},
 
   doCommand(aCommand) {
     window.openDialog(
-      "chrome://editor/content/EdButtonProps.xul",
+      "chrome://messenger/content/messengercompose/EdButtonProps.xul",
       "_blank",
       "chrome,close,titlebar,modal"
     );
   },
 };
 
 var nsLabelCommand = {
   isCommandEnabled(aCommand, dummy) {
@@ -2811,17 +2811,17 @@ var nsLabelCommand = {
         labelElement = editor.getElementOrParentByTagName(
           tagName,
           editor.selection.focusNode
         );
       }
       if (labelElement) {
         // We only open the dialog for an existing label
         window.openDialog(
-          "chrome://editor/content/EdLabelProps.xul",
+          "chrome://messenger/content/messengercompose/EdLabelProps.xul",
           "_blank",
           "chrome,close,titlebar,modal",
           labelElement
         );
       } else {
         EditorSetTextProperty(tagName, "", "");
       }
     } catch (e) {}
@@ -2833,17 +2833,17 @@ var nsFieldSetCommand = {
     return IsDocumentEditable() && IsEditingRenderedHTML();
   },
 
   getCommandStateParams(aCommand, aParams, aRefCon) {},
   doCommandParams(aCommand, aParams, aRefCon) {},
 
   doCommand(aCommand) {
     window.openDialog(
-      "chrome://editor/content/EdFieldSetProps.xul",
+      "chrome://messenger/content/messengercompose/EdFieldSetProps.xul",
       "_blank",
       "chrome,close,titlebar,modal"
     );
   },
 };
 
 var nsIsIndexCommand = {
   isCommandEnabled(aCommand, dummy) {
@@ -2871,17 +2871,17 @@ var nsImageCommand = {
     return IsDocumentEditable() && IsEditingRenderedHTML();
   },
 
   getCommandStateParams(aCommand, aParams, aRefCon) {},
   doCommandParams(aCommand, aParams, aRefCon) {},
 
   doCommand(aCommand) {
     window.openDialog(
-      "chrome://editor/content/EdImageProps.xul",
+      "chrome://messenger/content/messengercompose/EdImageProps.xul",
       "_blank",
       "chrome,close,titlebar,modal"
     );
   },
 };
 
 var nsHLineCommand = {
   isCommandEnabled(aCommand, dummy) {
@@ -2904,17 +2904,17 @@ var nsHLineCommand = {
       hLine = editor.getSelectedElement(tagName);
     } catch (e) {
       return;
     }
 
     if (hLine) {
       // We only open the dialog for an existing HRule
       window.openDialog(
-        "chrome://editor/content/EdHLineProps.xul",
+        "chrome://messenger/content/messengercompose/EdHLineProps.xul",
         "_blank",
         "chrome,close,titlebar,modal"
       );
     } else {
       try {
         hLine = editor.createElementWithDefaults(tagName);
 
         // We change the default attributes to those saved in the user prefs
@@ -2958,25 +2958,25 @@ var nsLinkCommand = {
   doCommandParams(aCommand, aParams, aRefCon) {},
 
   doCommand(aCommand) {
     // If selected element is an image, launch that dialog instead
     // since last tab panel handles link around an image
     var element = GetObjectForProperties();
     if (element && element.nodeName.toLowerCase() == "img") {
       window.openDialog(
-        "chrome://editor/content/EdImageProps.xul",
+        "chrome://messenger/content/messengercompose/EdImageProps.xul",
         "_blank",
         "chrome,close,titlebar,modal",
         null,
         true
       );
     } else {
       window.openDialog(
-        "chrome://editor/content/EdLinkProps.xul",
+        "chrome://messenger/content/messengercompose/EdLinkProps.xul",
         "_blank",
         "chrome,close,titlebar,modal"
       );
     }
   },
 };
 
 var nsAnchorCommand = {
@@ -2984,17 +2984,17 @@ var nsAnchorCommand = {
     return IsDocumentEditable() && IsEditingRenderedHTML();
   },
 
   getCommandStateParams(aCommand, aParams, aRefCon) {},
   doCommandParams(aCommand, aParams, aRefCon) {},
 
   doCommand(aCommand) {
     window.openDialog(
-      "chrome://editor/content/EdNamedAnchorProps.xul",
+      "chrome://messenger/content/messengercompose/EdNamedAnchorProps.xul",
       "_blank",
       "chrome,close,titlebar,modal",
       ""
     );
   },
 };
 
 var nsInsertHTMLWithDialogCommand = {
@@ -3002,17 +3002,17 @@ var nsInsertHTMLWithDialogCommand = {
     return IsDocumentEditable() && IsEditingRenderedHTML();
   },
 
   getCommandStateParams(aCommand, aParams, aRefCon) {},
   doCommandParams(aCommand, aParams, aRefCon) {},
 
   doCommand(aCommand) {
     window.openDialog(
-      "chrome://editor/content/EdInsSrc.xul",
+      "chrome://messenger/content/messengercompose/EdInsSrc.xul",
       "_blank",
       "chrome,close,titlebar,modal,resizable",
       ""
     );
   },
 };
 
 var nsInsertMathWithDialogCommand = {
@@ -3020,17 +3020,17 @@ var nsInsertMathWithDialogCommand = {
     return IsDocumentEditable() && IsEditingRenderedHTML();
   },
 
   getCommandStateParams(aCommand, aParams, aRefCon) {},
   doCommandParams(aCommand, aParams, aRefCon) {},
 
   doCommand(aCommand) {
     window.openDialog(
-      "chrome://editor/content/EdInsertMath.xul",
+      "chrome://messenger/content/messengercompose/EdInsertMath.xul",
       "_blank",
       "chrome,close,titlebar,modal,resizable",
       ""
     );
   },
 };
 
 var nsInsertCharsCommand = {
@@ -3081,34 +3081,34 @@ var nsGridCommand = {
     return IsDocumentEditable() && IsEditingRenderedHTML();
   },
 
   getCommandStateParams(aCommand, aParams, aRefCon) {},
   doCommandParams(aCommand, aParams, aRefCon) {},
 
   doCommand(aCommand) {
     window.openDialog(
-      "chrome://editor/content/EdSnapToGrid.xul",
+      "chrome://messenger/content/messengercompose/EdSnapToGrid.xul",
       "_blank",
       "chrome,close,titlebar,modal"
     );
   },
 };
 
 var nsListPropertiesCommand = {
   isCommandEnabled(aCommand, dummy) {
     return IsDocumentEditable() && IsEditingRenderedHTML();
   },
 
   getCommandStateParams(aCommand, aParams, aRefCon) {},
   doCommandParams(aCommand, aParams, aRefCon) {},
 
   doCommand(aCommand) {
     window.openDialog(
-      "chrome://editor/content/EdListProps.xul",
+      "chrome://messenger/content/messengercompose/EdListProps.xul",
       "_blank",
       "chrome,close,titlebar,modal"
     );
   },
 };
 
 var nsPagePropertiesCommand = {
   isCommandEnabled(aCommand, dummy) {
@@ -3116,17 +3116,17 @@ var nsPagePropertiesCommand = {
   },
 
   getCommandStateParams(aCommand, aParams, aRefCon) {},
   doCommandParams(aCommand, aParams, aRefCon) {},
 
   doCommand(aCommand) {
     var oldTitle = GetDocumentTitle();
     window.openDialog(
-      "chrome://editor/content/EdPageProps.xul",
+      "chrome://messenger/content/messengercompose/EdPageProps.xul",
       "_blank",
       "chrome,close,titlebar,modal",
       ""
     );
 
     // Update main window title and
     // recent menu data in prefs if doc title changed
     if (GetDocumentTitle() != oldTitle) {
@@ -3325,17 +3325,17 @@ var nsSetSmiley = {
   },
   // This is now deprecated in favor of "doCommandParams"
   doCommand(aCommand) {},
 };
 
 function doAdvancedProperties(element) {
   if (element) {
     window.openDialog(
-      "chrome://editor/content/EdAdvancedEdit.xul",
+      "chrome://messenger/content/messengercompose/EdAdvancedEdit.xul",
       "_blank",
       "chrome,close,titlebar,modal,resizable=yes",
       "",
       element
     );
   }
 }
 
@@ -3361,17 +3361,17 @@ var nsColorPropertiesCommand = {
     return IsDocumentEditable() && IsEditingRenderedHTML();
   },
 
   getCommandStateParams(aCommand, aParams, aRefCon) {},
   doCommandParams(aCommand, aParams, aRefCon) {},
 
   doCommand(aCommand) {
     window.openDialog(
-      "chrome://editor/content/EdColorProps.xul",
+      "chrome://messenger/content/messengercompose/EdColorProps.xul",
       "_blank",
       "chrome,close,titlebar,modal",
       ""
     );
     UpdateDefaultColors();
   },
 };
 
@@ -4052,15 +4052,15 @@ var nsConvertToTable = {
   },
 
   getCommandStateParams(aCommand, aParams, aRefCon) {},
   doCommandParams(aCommand, aParams, aRefCon) {},
 
   doCommand(aCommand) {
     if (this.isCommandEnabled()) {
       window.openDialog(
-        "chrome://editor/content/EdConvertToTable.xul",
+        "chrome://messenger/content/messengercompose/EdConvertToTable.xul",
         "_blank",
         "chrome,close,titlebar,modal"
       );
     }
   },
 };
copy from editor/ui/composer/content/EditorContent.css
copy to mail/components/compose/content/EditorContent.css
--- a/editor/ui/composer/content/EditorContent.css
+++ b/mail/components/compose/content/EditorContent.css
@@ -9,17 +9,17 @@
  *  place in EditorOverride.css, instead of here.
 */
 
 @import url(chrome://communicator/skin/smileys.css);
 
 a[name] {
   min-height: 17px; margin-left: 2px; margin-top: 2px;
   padding-left: 20px;
-  background-image: url(chrome://editor/content/images/tag-anchor.gif);
+  background-image: url(chrome://messenger/content/messengercompose/images/tag-anchor.gif);
   background-repeat: no-repeat;
   background-position: top left;
 }
 
 /* Force border display for empty cells
    and tables with 0 border
 */
 table {
--- a/mail/components/compose/content/MsgComposeCommands.js
+++ b/mail/components/compose/content/MsgComposeCommands.js
@@ -1,21 +1,21 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* global MozElements */
 
-/* import-globals-from ../../../../editor/ui/composer/content/ComposerCommands.js */
-/* import-globals-from ../../../../editor/ui/composer/content/editor.js */
-/* import-globals-from ../../../../editor/ui/composer/content/editorUtilities.js */
 /* import-globals-from ../../../../mailnews/addrbook/content/abDragDrop.js */
 /* import-globals-from ../../../base/content/mailCore.js */
 /* import-globals-from ../../../base/content/utilityOverlay.js */
 /* import-globals-from addressingWidgetOverlay.js */
+/* import-globals-from ComposerCommands.js */
+/* import-globals-from editor.js */
+/* import-globals-from editorUtilities.js */
 
 /**
  * Commands for the message composition window.
  */
 
 // Ensure the activity modules are loaded for this window.
 ChromeUtils.import("resource:///modules/activity/activityModules.jsm");
 var { AttachmentChecker } = ChromeUtils.import(
@@ -957,17 +957,17 @@ var defaultController = {
         return true;
       },
       doCommand() {
         window.cancelSendMessage = false;
         var skipBlockQuotes =
           window.document.documentElement.getAttribute("windowtype") ==
           "msgcompose";
         window.openDialog(
-          "chrome://editor/content/EdSpellCheck.xul",
+          "chrome://messenger/content/messengercompose/EdSpellCheck.xul",
           "_blank",
           "dialog,close,titlebar,modal,resizable",
           false,
           skipBlockQuotes,
           true
         );
       },
     },
@@ -3560,17 +3560,17 @@ function GenericSendMessage(msgType) {
     // Do we need to check the spelling?
     if (DoSpellCheckBeforeSend()) {
       // We disable spellcheck for the following -subject line, attachment
       // pane, identity and addressing widget therefore we need to explicitly
       // focus on the mail body when we have to do a spellcheck.
       SetMsgBodyFrameFocus();
       window.cancelSendMessage = false;
       window.openDialog(
-        "chrome://editor/content/EdSpellCheck.xul",
+        "chrome://messenger/content/messengercompose/EdSpellCheck.xul",
         "_blank",
         "dialog,close,titlebar,modal,resizable",
         true,
         true,
         false
       );
 
       if (window.cancelSendMessage) {
copy from editor/ui/dialogs/content/EdAEAttributes.js
copy to mail/components/compose/content/dialogs/EdAEAttributes.js
copy from editor/ui/dialogs/content/EdAECSSAttributes.js
copy to mail/components/compose/content/dialogs/EdAECSSAttributes.js
--- a/editor/ui/dialogs/content/EdAECSSAttributes.js
+++ b/mail/components/compose/content/dialogs/EdAECSSAttributes.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdAdvancedEdit.js */
 /* import-globals-from EdDialogCommon.js */
 
 // build attribute list in tree form from element attributes
 function BuildCSSAttributeTable() {
   var style = gElement.style;
   if (style == undefined) {
     dump("Inline styles undefined\n");
copy from editor/ui/dialogs/content/EdAEHTMLAttributes.js
copy to mail/components/compose/content/dialogs/EdAEHTMLAttributes.js
--- a/editor/ui/dialogs/content/EdAEHTMLAttributes.js
+++ b/mail/components/compose/content/dialogs/EdAEHTMLAttributes.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdAdvancedEdit.js */
 /* import-globals-from EdDialogCommon.js */
 
 function BuildHTMLAttributeNameList() {
   gDialog.AddHTMLAttributeNameInput.removeAllItems();
 
   var elementName = gElement.localName;
   var attNames = gHTMLAttr[elementName];
copy from editor/ui/dialogs/content/EdAEJSEAttributes.js
copy to mail/components/compose/content/dialogs/EdAEJSEAttributes.js
--- a/editor/ui/dialogs/content/EdAEJSEAttributes.js
+++ b/mail/components/compose/content/dialogs/EdAEJSEAttributes.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdAdvancedEdit.js */
 /* import-globals-from EdDialogCommon.js */
 
 function BuildJSEAttributeNameList() {
   gDialog.AddJSEAttributeNameList.removeAllItems();
 
   // Get events specific to current element
   var elementName = gElement.localName;
copy from editor/ui/dialogs/content/EdAdvancedEdit.js
copy to mail/components/compose/content/dialogs/EdAdvancedEdit.js
--- a/editor/ui/dialogs/content/EdAdvancedEdit.js
+++ b/mail/components/compose/content/dialogs/EdAdvancedEdit.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdAEAttributes.js */
 /* import-globals-from EdAECSSAttributes.js */
 /* import-globals-from EdAEHTMLAttributes.js */
 /* import-globals-from EdAEJSEAttributes.js */
 /* import-globals-from EdDialogCommon.js */
 
 /** ************         GLOBALS         **************/
 var gElement = null; // handle to actual element edited
copy from editor/ui/dialogs/content/EdAdvancedEdit.xul
copy to mail/components/compose/content/dialogs/EdAdvancedEdit.xul
--- a/editor/ui/dialogs/content/EdAdvancedEdit.xul
+++ b/mail/components/compose/content/dialogs/EdAdvancedEdit.xul
@@ -5,35 +5,35 @@
 
 <!-- first checkin of the year 2000!      -->
 <!-- Ben Goodger, 12:50AM, 01/00/00 NZST  -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 <?xml-stylesheet href="chrome://messenger/skin/menulist.css" type="text/css"?>
 
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EdAdvancedEdit.dtd">
+<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/messengercompose/EdAdvancedEdit.dtd">
 
 <dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
     id="advancedEditDlg"
     style="width: 40em;"
     title="&WindowTitle.label;"
     onload="Startup()">
 
   <!-- Methods common to all editor dialogs -->
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
   <!-- element page functions -->
-  <script src="chrome://editor/content/EdAEHTMLAttributes.js"/>
-  <script src="chrome://editor/content/EdAECSSAttributes.js"/>
-  <script src="chrome://editor/content/EdAEJSEAttributes.js"/>
-  <script src="chrome://editor/content/EdAEAttributes.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdAEHTMLAttributes.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdAECSSAttributes.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdAEJSEAttributes.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdAEAttributes.js"/>
 
   <!-- global dialog functions -->
-  <script src="chrome://editor/content/EdAdvancedEdit.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdAdvancedEdit.js"/>
 
   <script src="chrome://messenger/content/customElements.js"/>
 
   <hbox>
     <label value="&currentattributesfor.label;"/>
     <label class="header" id="tagLabel"/>
   </hbox>
 
copy from editor/ui/dialogs/content/EdButtonProps.js
copy to mail/components/compose/content/dialogs/EdButtonProps.js
--- a/editor/ui/dialogs/content/EdButtonProps.js
+++ b/mail/components/compose/content/dialogs/EdButtonProps.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 var insertNew;
 var buttonElement;
 
 // dialog initialization code
 
 document.addEventListener("dialogaccept", onAccept);
copy from editor/ui/dialogs/content/EdButtonProps.xul
copy to mail/components/compose/content/dialogs/EdButtonProps.xul
--- a/editor/ui/dialogs/content/EdButtonProps.xul
+++ b/mail/components/compose/content/dialogs/EdButtonProps.xul
@@ -2,31 +2,31 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
 <!DOCTYPE dialog [
-<!ENTITY % edButtonProperties SYSTEM "chrome://editor/locale/EditorButtonProperties.dtd">
+<!ENTITY % edButtonProperties SYSTEM "chrome://messenger/locale/messengercompose/EditorButtonProperties.dtd">
 %edButtonProperties;
-<!ENTITY % edDialogOverlay SYSTEM "chrome://editor/locale/EdDialogOverlay.dtd">
+<!ENTITY % edDialogOverlay SYSTEM "chrome://messenger/locale/messengercompose/EdDialogOverlay.dtd">
 %edDialogOverlay;
 ]>
 
 <dialog title="&windowTitle.label;"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
         onload="Startup();"
         buttons="accept,cancel">
 
   <!-- Methods common to all editor dialogs -->
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdButtonProps.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdButtonProps.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
 
   <groupbox>
     <hbox class="groupbox-title">
       <label class="header">&Settings.label;</label>
     </hbox>
     <grid><columns><column/><column/></columns>
copy from editor/ui/dialogs/content/EdColorPicker.js
copy to mail/components/compose/content/dialogs/EdColorPicker.js
--- a/editor/ui/dialogs/content/EdColorPicker.js
+++ b/mail/components/compose/content/dialogs/EdColorPicker.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 // Cancel() is in EdDialogCommon.js
 
 var insertNew = true;
 var tagname = "TAG NAME";
 var gColor = "";
 var LastPickedColor = "";
copy from editor/ui/dialogs/content/EdColorPicker.xul
copy to mail/components/compose/content/dialogs/EdColorPicker.xul
--- a/editor/ui/dialogs/content/EdColorPicker.xul
+++ b/mail/components/compose/content/dialogs/EdColorPicker.xul
@@ -1,26 +1,26 @@
 <?xml version="1.0"?>
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EdColorPicker.dtd">
+<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/messengercompose/EdColorPicker.dtd">
 
 <dialog title="&windowTitle.label;"
     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
     xmlns:html="http://www.w3.org/1999/xhtml"
     onload="Startup()">
 
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdColorPicker.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdColorPicker.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
 
   <hbox id="TableOrCellGroup" align="center" collapsed="true">
     <label control="CellOrTableGroup" value="&background.label;" accesskey="&background.accessKey;"/>
     <radiogroup id="CellOrTableGroup" orient="horizontal">
       <radio id="TableRadio" label="&table.label;" accesskey="&table.accessKey;"/>
       <radio id="CellRadio"  label="&cell.label;"  accesskey="&cell.accessKey;"/>
copy from editor/ui/dialogs/content/EdColorProps.js
copy to mail/components/compose/content/dialogs/EdColorProps.js
--- a/editor/ui/dialogs/content/EdColorProps.js
+++ b/mail/components/compose/content/dialogs/EdColorProps.js
@@ -7,17 +7,17 @@
  Radio buttons select "UseDefaultColors" vs. "UseCustomColors" modes.
  If any color attribute is set in the body, mode is "Custom Colors",
   even if 1 or more (but not all) are actually null (= "use default")
  When in "Custom Colors" mode, all colors will be set on body tag,
   even if they are just default colors, to assure compatible colors in page.
  User cannot select "use default" for individual colors
 */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 // Cancel() is in EdDialogCommon.js
 
 document.addEventListener("dialogaccept", onAccept);
 document.addEventListener("dialogcancel", onCancel);
 
 var gBodyElement;
@@ -215,17 +215,17 @@ function GetColorAndUpdate(ColorWellID) 
       break;
     case "backgroundCW":
       colorObj.Type = "Page";
       colorObj.PageColor = customBackgroundColor;
       break;
   }
 
   window.openDialog(
-    "chrome://editor/content/EdColorPicker.xul",
+    "chrome://messenger/content/messengercompose/EdColorPicker.xul",
     "_blank",
     "chrome,close,titlebar,modal",
     "",
     colorObj
   );
 
   // User canceled the dialog
   if (colorObj.Cancel) {
copy from editor/ui/dialogs/content/EdColorProps.xul
copy to mail/components/compose/content/dialogs/EdColorProps.xul
--- a/editor/ui/dialogs/content/EdColorProps.xul
+++ b/mail/components/compose/content/dialogs/EdColorProps.xul
@@ -2,31 +2,31 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
 <!DOCTYPE dialog [
-<!ENTITY % edColorPropertiesDTD SYSTEM "chrome://editor/locale/EditorColorProperties.dtd">
+<!ENTITY % edColorPropertiesDTD SYSTEM "chrome://messenger/locale/messengercompose/EditorColorProperties.dtd">
 %edColorPropertiesDTD;
 <!ENTITY % composeEditorOverlayDTD SYSTEM "chrome://messenger/locale/messengercompose/mailComposeEditorOverlay.dtd">
 %composeEditorOverlayDTD;
-<!ENTITY % edDialogOverlay SYSTEM "chrome://editor/locale/EdDialogOverlay.dtd">
+<!ENTITY % edDialogOverlay SYSTEM "chrome://messenger/locale/messengercompose/EdDialogOverlay.dtd">
 %edDialogOverlay;
 ]>
 
 <dialog title="&windowTitle.label;"
     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
     onload="Startup()">
 
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdColorProps.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdColorProps.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
 
   <groupbox align="start">
     <hbox class="groupbox-title">
       <label class="header">&pageColors.label;</label>
     </hbox>
     <radiogroup id="PageColorGroup">
copy from editor/ui/dialogs/content/EdConvertToTable.js
copy to mail/components/compose/content/dialogs/EdConvertToTable.js
--- a/editor/ui/dialogs/content/EdConvertToTable.js
+++ b/mail/components/compose/content/dialogs/EdConvertToTable.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 document.addEventListener("dialogaccept", onAccept);
 document.addEventListener("dialogcancel", onCancel);
 
 var gIndex;
 var gCommaIndex = "0";
 var gSpaceIndex = "1";
copy from editor/ui/dialogs/content/EdConvertToTable.xul
copy to mail/components/compose/content/dialogs/EdConvertToTable.xul
--- a/editor/ui/dialogs/content/EdConvertToTable.xul
+++ b/mail/components/compose/content/dialogs/EdConvertToTable.xul
@@ -2,28 +2,28 @@
 
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EdConvertToTable.dtd">
+<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/messengercompose/EdConvertToTable.dtd">
 
 <dialog title="&windowTitle.label;"
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
    onload = "Startup()"
    style="min-width:20em">
 
   <!-- Methods common to all editor dialogs -->
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
   <!--- Element-specific methods -->
-  <script src="chrome://editor/content/EdConvertToTable.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdConvertToTable.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
   <description class="wrap" flex="1">&instructions1.label;</description>
   <description class="wrap" flex="1">&instructions2.label;</description>
   <radiogroup id="SepRadioGroup" persist="index character" index="0" character="">
     <radio id="comma" label="&commaRadio.label;" oncommand="SelectCharacter('0');"/>
     <radio id="space" label="&spaceRadio.label;" oncommand="SelectCharacter('1');"/>
     <hbox>
copy from editor/ui/dialogs/content/EdDialogCommon.js
copy to mail/components/compose/content/dialogs/EdDialogCommon.js
--- a/editor/ui/dialogs/content/EdDialogCommon.js
+++ b/mail/components/compose/content/dialogs/EdDialogCommon.js
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Each editor window must include this file
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* globals InitDialog, ChangeLinkLocation, ValidateData */
 
 // Object to attach commonly-used widgets (all dialogs should use this)
 var gDialog = {};
 
 var gHaveDocumentUrl = false;
 var gValidationError = false;
 
@@ -316,17 +316,17 @@ function InitPixelOrPercentMenulist(
 function onAdvancedEdit() {
   // First validate data from widgets in the "simpler" property dialog
   if (ValidateData()) {
     // Set true if OK is clicked in the Advanced Edit dialog
     window.AdvancedEditOK = false;
     // Open the AdvancedEdit dialog, passing in the element to be edited
     //  (the copy named "globalElement")
     window.openDialog(
-      "chrome://editor/content/EdAdvancedEdit.xul",
+      "chrome://messenger/content/messengercompose/EdAdvancedEdit.xul",
       "_blank",
       "chrome,close,titlebar,modal,resizable=yes",
       "",
       globalElement
     );
     window.focus();
     if (window.AdvancedEditOK) {
       // Copy edited attributes to the dialog widgets:
copy from editor/ui/dialogs/content/EdDictionary.js
copy to mail/components/compose/content/dialogs/EdDictionary.js
--- a/editor/ui/dialogs/content/EdDictionary.js
+++ b/mail/components/compose/content/dialogs/EdDictionary.js
@@ -1,14 +1,14 @@
 /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 var gSpellChecker;
 var gWordToAdd;
 
 function Startup() {
   if (!GetCurrentEditor()) {
     window.close();
copy from editor/ui/dialogs/content/EdDictionary.xul
copy to mail/components/compose/content/dialogs/EdDictionary.xul
--- a/editor/ui/dialogs/content/EdDictionary.xul
+++ b/mail/components/compose/content/dialogs/EdDictionary.xul
@@ -1,25 +1,25 @@
 <?xml version="1.0"?>
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorPersonalDictionary.dtd">
+<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/messengercompose/EditorPersonalDictionary.dtd">
 <dialog buttons="cancel" title="&windowTitle.label;"
     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
     persist="screenX screenY"
     onload="Startup()">
 
   <!-- Methods common to all editor dialogs -->
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdDictionary.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDictionary.js"/>
 
   <grid>
     <columns><column style="width: 15em" flex="1"/><column flex="1"/></columns>
     <rows>
       <row>
         <label value="&wordEditField.label;"
                control="WordInput"
                accesskey="&wordEditField.accessKey;"/>
copy from editor/ui/dialogs/content/EdFieldSetProps.js
copy to mail/components/compose/content/dialogs/EdFieldSetProps.js
--- a/editor/ui/dialogs/content/EdFieldSetProps.js
+++ b/mail/components/compose/content/dialogs/EdFieldSetProps.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 var insertNew;
 var fieldsetElement;
 var newLegend;
 var legendElement;
 
 // dialog initialization code
copy from editor/ui/dialogs/content/EdFieldSetProps.xul
copy to mail/components/compose/content/dialogs/EdFieldSetProps.xul
--- a/editor/ui/dialogs/content/EdFieldSetProps.xul
+++ b/mail/components/compose/content/dialogs/EdFieldSetProps.xul
@@ -2,31 +2,31 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
 <!DOCTYPE dialog [
-<!ENTITY % edFieldSetProperties SYSTEM "chrome://editor/locale/EditorFieldSetProperties.dtd">
+<!ENTITY % edFieldSetProperties SYSTEM "chrome://messenger/locale/messengercompose/EditorFieldSetProperties.dtd">
 %edFieldSetProperties;
-<!ENTITY % edDialogOverlay SYSTEM "chrome://editor/locale/EdDialogOverlay.dtd">
+<!ENTITY % edDialogOverlay SYSTEM "chrome://messenger/locale/messengercompose/EdDialogOverlay.dtd">
 %edDialogOverlay;
 ]>
 
 <dialog title="&windowTitle.label;"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
         onload="Startup();"
         buttons="accept,cancel">
 
   <!-- Methods common to all editor dialogs -->
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdFieldSetProps.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdFieldSetProps.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
 
   <groupbox>
     <hbox class="groupbox-title">
       <label class="header" accesskey="&Legend.accesskey;">&Legend.label;</label>
     </hbox>
     <grid><columns><column/><column/></columns>
copy from editor/ui/dialogs/content/EdFormProps.js
copy to mail/components/compose/content/dialogs/EdFormProps.js
--- a/editor/ui/dialogs/content/EdFormProps.js
+++ b/mail/components/compose/content/dialogs/EdFormProps.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 var gForm;
 var insertNew;
 var formElement;
 var formActionWarning;
 
 document.addEventListener("dialogaccept", onAccept);
copy from editor/ui/dialogs/content/EdFormProps.xul
copy to mail/components/compose/content/dialogs/EdFormProps.xul
--- a/editor/ui/dialogs/content/EdFormProps.xul
+++ b/mail/components/compose/content/dialogs/EdFormProps.xul
@@ -3,31 +3,31 @@
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 <?xml-stylesheet href="chrome://messenger/skin/menulist.css" type="text/css"?>
 
 <!DOCTYPE dialog [
-<!ENTITY % edFormProperties SYSTEM "chrome://editor/locale/EditorFormProperties.dtd">
+<!ENTITY % edFormProperties SYSTEM "chrome://messenger/locale/messengercompose/EditorFormProperties.dtd">
 %edFormProperties;
-<!ENTITY % edDialogOverlay SYSTEM "chrome://editor/locale/EdDialogOverlay.dtd">
+<!ENTITY % edDialogOverlay SYSTEM "chrome://messenger/locale/messengercompose/EdDialogOverlay.dtd">
 %edDialogOverlay;
 ]>
 
 <dialog title="&windowTitle.label;"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
         onload="Startup();"
         buttons="accept,cancel">
 
   <!-- Methods common to all editor dialogs -->
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdFormProps.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdFormProps.js"/>
 
   <script src="chrome://messenger/content/customElements.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
 
   <groupbox>
     <hbox class="groupbox-title">
       <label class="header">&Settings.label;</label>
copy from editor/ui/dialogs/content/EdHLineProps.js
copy to mail/components/compose/content/dialogs/EdHLineProps.js
--- a/editor/ui/dialogs/content/EdHLineProps.js
+++ b/mail/components/compose/content/dialogs/EdHLineProps.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 var tagName = "hr";
 var gHLineElement;
 var width;
 var height;
 var align;
 var shading;
copy from editor/ui/dialogs/content/EdHLineProps.xul
copy to mail/components/compose/content/dialogs/EdHLineProps.xul
--- a/editor/ui/dialogs/content/EdHLineProps.xul
+++ b/mail/components/compose/content/dialogs/EdHLineProps.xul
@@ -3,31 +3,31 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
 <!DOCTYPE dialog [
-<!ENTITY % edHLineProperties SYSTEM "chrome://editor/locale/EditorHLineProperties.dtd">
+<!ENTITY % edHLineProperties SYSTEM "chrome://messenger/locale/messengercompose/EditorHLineProperties.dtd">
 %edHLineProperties;
-<!ENTITY % edDialogOverlay SYSTEM "chrome://editor/locale/EdDialogOverlay.dtd">
+<!ENTITY % edDialogOverlay SYSTEM "chrome://messenger/locale/messengercompose/EdDialogOverlay.dtd">
 %edDialogOverlay;
 ]>
 
 <dialog title="&windowTitle.label;"
     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
     onload="Startup()">
 
   <!-- Methods common to all editor dialogs -->
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
   <!--- Element-specific methods -->
-  <script src="chrome://editor/content/EdHLineProps.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdHLineProps.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
 
   <groupbox>
     <hbox class="groupbox-title">
       <label class="header">&dimensionsBox.label;</label>
     </hbox>
     <grid>
copy from editor/ui/dialogs/content/EdImageDialog.js
copy to mail/components/compose/content/dialogs/EdImageDialog.js
--- a/editor/ui/dialogs/content/EdImageDialog.js
+++ b/mail/components/compose/content/dialogs/EdImageDialog.js
@@ -7,17 +7,17 @@
  When there's no alt text, we always write 'alt=""' as the attribute, since "alt" is a required attribute.
  We allow users to not have alt text by checking a "Don't use alterate text" radio button,
  and we don't accept spaces as valid alt text. A space used to be required to avoid the error message
  if user didn't enter alt text, but is unnecessary now that we no longer annoy the user
  with the error dialog if alt="" is present on an img element.
  We trim all spaces at the beginning and end of user's alt text
 */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 var gInsertNewImage = true;
 var gDoAltTextError = false;
 var gConstrainOn = false;
 // Note used in current version, but these are set correctly
 //  and could be used to reset width and height used for constrain ratio
 var gConstrainWidth = 0;
copy from editor/ui/dialogs/content/EdImageLinkLoader.js
copy to mail/components/compose/content/dialogs/EdImageLinkLoader.js
--- a/editor/ui/dialogs/content/EdImageLinkLoader.js
+++ b/mail/components/compose/content/dialogs/EdImageLinkLoader.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var gMsgCompProcessLink = false;
 var gMsgCompInputElement = null;
 var gMsgCompPrevInputValue = null;
 var gMsgCompPrevMozDoNotSendAttribute;
copy from editor/ui/dialogs/content/EdImageProps.js
copy to mail/components/compose/content/dialogs/EdImageProps.js
--- a/editor/ui/dialogs/content/EdImageProps.js
+++ b/mail/components/compose/content/dialogs/EdImageProps.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 /* import-globals-from EdImageDialog.js */
 
 var gAnchorElement = null;
 var gLinkElement = null;
 var gOriginalHref = "";
 var gHNodeArray = {};
 
@@ -275,17 +275,17 @@ function onAccept(event) {
   gDoAltTextError = false;
 
   event.preventDefault();
 }
 
 function onLinkAdvancedEdit() {
   window.AdvancedEditOK = false;
   window.openDialog(
-    "chrome://editor/content/EdAdvancedEdit.xul",
+    "chrome://messenger/content/messengercompose/EdAdvancedEdit.xul",
     "_blank",
     "chrome,close,titlebar,modal,resizable=yes",
     "",
     gLinkElement
   );
   window.focus();
   if (window.AdvancedEditOK) {
     gDialog.hrefInput.value = gLinkElement.getAttribute("href");
copy from editor/ui/dialogs/content/EdImageProps.xul
copy to mail/components/compose/content/dialogs/EdImageProps.xul
--- a/editor/ui/dialogs/content/EdImageProps.xul
+++ b/mail/components/compose/content/dialogs/EdImageProps.xul
@@ -2,35 +2,35 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
 <!DOCTYPE dialog [
-<!ENTITY % edImageProperties SYSTEM "chrome://editor/locale/EditorImageProperties.dtd">
+<!ENTITY % edImageProperties SYSTEM "chrome://messenger/locale/messengercompose/EditorImageProperties.dtd">
 %edImageProperties;
 <!ENTITY % composeEditorOverlayDTD SYSTEM "chrome://messenger/locale/messengercompose/mailComposeEditorOverlay.dtd">
 %composeEditorOverlayDTD;
-<!ENTITY % edDialogOverlay SYSTEM "chrome://editor/locale/EdDialogOverlay.dtd">
+<!ENTITY % edDialogOverlay SYSTEM "chrome://messenger/locale/messengercompose/EdDialogOverlay.dtd">
 %edDialogOverlay;
 ]>
 
 <!-- dialog containing a control requiring initial setup -->
 <dialog id="imageDlg" title="&windowTitle.label;"
-    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
-    onload="Startup()"
-    buttons="accept,cancel">
+        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
+        onload="Startup()"
+        buttons="accept,cancel">
 
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdImageProps.js"/>
-  <script src="chrome://editor/content/EdImageDialog.js"/>
-  <script src="chrome://editor/content/EdImageLinkLoader.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdImageProps.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdImageDialog.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdImageLinkLoader.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
 
   <tabbox id="TabBox">
     <tabs flex="1">
       <tab id="imageLocationTab" label="&imageLocationTab.label;"/>
       <tab id="imageDimensionsTab" label="&imageDimensionsTab.label;"/>
       <tab id="imageAppearanceTab" label="&imageAppearanceTab.label;"/>
copy from editor/ui/dialogs/content/EdInputImage.js
copy to mail/components/compose/content/dialogs/EdInputImage.js
--- a/editor/ui/dialogs/content/EdInputImage.js
+++ b/mail/components/compose/content/dialogs/EdInputImage.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 /* import-globals-from EdImageDialog.js */
 
 // dialog initialization code
 
 document.addEventListener("dialogaccept", onAccept);
 document.addEventListener("dialogcancel", onCancel);
 
copy from editor/ui/dialogs/content/EdInputImage.xul
copy to mail/components/compose/content/dialogs/EdInputImage.xul
--- a/editor/ui/dialogs/content/EdInputImage.xul
+++ b/mail/components/compose/content/dialogs/EdInputImage.xul
@@ -2,34 +2,34 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
 <!DOCTYPE dialog [
-<!ENTITY % edInputProperties SYSTEM "chrome://editor/locale/EditorInputProperties.dtd">
+<!ENTITY % edInputProperties SYSTEM "chrome://messenger/locale/messengercompose/EditorInputProperties.dtd">
 %edInputProperties;
-<!ENTITY % edImageProperties SYSTEM "chrome://editor/locale/EditorImageProperties.dtd">
+<!ENTITY % edImageProperties SYSTEM "chrome://messenger/locale/messengercompose/EditorImageProperties.dtd">
 %edImageProperties;
 <!ENTITY % composeEditorOverlayDTD SYSTEM "chrome://messenger/locale/messengercompose/mailComposeEditorOverlay.dtd">
 %composeEditorOverlayDTD;
-<!ENTITY % edDialogOverlay SYSTEM "chrome://editor/locale/EdDialogOverlay.dtd">
+<!ENTITY % edDialogOverlay SYSTEM "chrome://messenger/locale/messengercompose/EdDialogOverlay.dtd">
 %edDialogOverlay;
 ]>
 
 <dialog title="&windowTitleImage.label;"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
         onload="Startup();">
 
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdInputImage.js"/>
-  <script src="chrome://editor/content/EdImageDialog.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdInputImage.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdImageDialog.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
 
   <tabbox id="TabBox">
     <tabs flex="1">
       <tab id="imageInputTab" label="&imageInputTab.label;"/>
       <tab id="imageLocationTab" label="&imageLocationTab.label;"/>
       <tab id="imageDimensionsTab" label="&imageDimensionsTab.label;"/>
copy from editor/ui/dialogs/content/EdInputProps.js
copy to mail/components/compose/content/dialogs/EdInputProps.js
--- a/editor/ui/dialogs/content/EdInputProps.js
+++ b/mail/components/compose/content/dialogs/EdInputProps.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 var insertNew;
 var inputElement;
 
 // dialog initialization code
 
 document.addEventListener("dialogaccept", onAccept);
@@ -227,17 +227,17 @@ function onInput() {
   if (gDialog.accept.disabled != disabled) {
     gDialog.accept.disabled = disabled;
     gDialog.AdvancedEditButton.disabled = disabled;
   }
 }
 
 function doImageProperties() {
   window.openDialog(
-    "chrome://editor/content/EdImageProps.xul",
+    "chrome://messenger/content/messengercompose/EdImageProps.xul",
     "_blank",
     "chrome,close,titlebar,modal",
     globalElement
   );
   window.focus();
   onInput();
 }
 
copy from editor/ui/dialogs/content/EdInputProps.xul
copy to mail/components/compose/content/dialogs/EdInputProps.xul
--- a/editor/ui/dialogs/content/EdInputProps.xul
+++ b/mail/components/compose/content/dialogs/EdInputProps.xul
@@ -2,31 +2,31 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
 <!DOCTYPE dialog [
-<!ENTITY % edInputProperties SYSTEM "chrome://editor/locale/EditorInputProperties.dtd">
+<!ENTITY % edInputProperties SYSTEM "chrome://messenger/locale/messengercompose/EditorInputProperties.dtd">
 %edInputProperties;
-<!ENTITY % edDialogOverlay SYSTEM "chrome://editor/locale/EdDialogOverlay.dtd">
+<!ENTITY % edDialogOverlay SYSTEM "chrome://messenger/locale/messengercompose/EdDialogOverlay.dtd">
 %edDialogOverlay;
 ]>
 
 <dialog title="&windowTitle.label;"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
         onload="Startup();"
         buttons="accept,cancel">
 
   <!-- Methods common to all editor dialogs -->
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdInputProps.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdInputProps.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
 
   <groupbox>
     <hbox class="groupbox-title">
       <label class="header" control="InputType" accesskey="&InputType.accesskey;">&InputType.label;</label>
     </hbox>
     <menulist id="InputType" oncommand="SelectInputType();">
copy from editor/ui/dialogs/content/EdInsSrc.js
copy to mail/components/compose/content/dialogs/EdInsSrc.js
--- a/editor/ui/dialogs/content/EdInsSrc.js
+++ b/mail/components/compose/content/dialogs/EdInsSrc.js
@@ -1,16 +1,16 @@
 /* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* Insert Source HTML dialog */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 var gFullDataStrings = new Map();
 var gShortDataStrings = new Map();
 var gListenerAttached = false;
 
 document.addEventListener("dialogaccept", onAccept);
 document.addEventListener("dialogcancel", onCancel);
copy from editor/ui/dialogs/content/EdInsSrc.xul
copy to mail/components/compose/content/dialogs/EdInsSrc.xul
--- a/editor/ui/dialogs/content/EdInsSrc.xul
+++ b/mail/components/compose/content/dialogs/EdInsSrc.xul
@@ -2,31 +2,31 @@
 
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorInsertSource.dtd">
+<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/messengercompose/EditorInsertSource.dtd">
 
 <dialog title="&windowTitle.label;"
     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
     xmlns:html="http://www.w3.org/1999/xhtml"
     onload = "Startup()"
     buttonlabelaccept="&insertButton.label;"
     buttonaccesskeyaccept="&insertButton.accesskey;">
 
   <!-- Methods common to all editor dialogs -->
   <script src="chrome://global/content/globalOverlay.js"/>
   <script src="chrome://global/content/editMenuOverlay.js"/>
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdInsSrc.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdInsSrc.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
 
   <label id="srcMessage" value="&sourceEditField.label;"/>
   <vbox flex="1" style="width: 30em; height: 20em;">
     <html:textarea id="srcInput" rows="18" flex="1"/>
   </vbox>
   <!-- Will this accept the embedded HTML tags? -->
copy from editor/ui/dialogs/content/EdInsertChars.js
copy to mail/components/compose/content/dialogs/EdInsertChars.js
--- a/editor/ui/dialogs/content/EdInsertChars.js
+++ b/mail/components/compose/content/dialogs/EdInsertChars.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 // ------------------------------------------------------------------
 // From Unicode 3.0 Page 54. 3.11 Conjoining Jamo Behavior
 var SBase = 0xac00;
 var LBase = 0x1100;
 var VBase = 0x1161;
 var TBase = 0x11a7;
copy from editor/ui/dialogs/content/EdInsertChars.xul
copy to mail/components/compose/content/dialogs/EdInsertChars.xul
--- a/editor/ui/dialogs/content/EdInsertChars.xul
+++ b/mail/components/compose/content/dialogs/EdInsertChars.xul
@@ -1,30 +1,30 @@
 <?xml version="1.0"?>
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorInsertChars.dtd">
+<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/messengercompose/EditorInsertChars.dtd">
 
 <dialog id="insertCharsDlg" title="&windowTitle.label;"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
         onload = "Startup()"
         onfocus = "onFocus()"
         buttonlabelaccept="&insertButton.label;"
         buttonlabelcancel="&closeButton.label;"
         style = "width: 20em">
 
   <!-- Methods common to all editor dialogs -->
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdInsertChars.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdInsertChars.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
 
   <groupbox>
     <hbox class="groupbox-title">
       <label class="header">&category.label;</label>
     </hbox>
     <radiogroup id="CatGrp" persist="category letter_index char_index">
copy from editor/ui/dialogs/content/EdInsertMath.js
copy to mail/components/compose/content/dialogs/EdInsertMath.js
--- a/editor/ui/dialogs/content/EdInsertMath.js
+++ b/mail/components/compose/content/dialogs/EdInsertMath.js
@@ -1,16 +1,16 @@
 /* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* Insert MathML dialog */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 document.addEventListener("dialogaccept", onAccept);
 document.addEventListener("dialogcancel", onCancel);
 
 function Startup() {
   var editor = GetCurrentEditor();
   if (!editor) {
@@ -30,17 +30,17 @@ function Startup() {
   gDialog.input.focus();
 
   // Load TeXZilla
   // TeXZilla.js contains non-ASCII characters and explicitly sets
   // window.TeXZilla, so we have to specify the charset parameter but don't
   // need to worry about the targetObj parameter.
   /* globals TeXZilla */
   Services.scriptloader.loadSubScript(
-    "chrome://editor/content/TeXZilla.js",
+    "chrome://messenger/content/messengercompose/TeXZilla.js",
     {},
     "UTF-8"
   );
 
   // Verify if the selection is on a <math> and initialize the dialog.
   gDialog.oldMath = editor.getElementOrParentByTagName("math", null);
   if (gDialog.oldMath) {
     // When these attributes are absent or invalid, they default to "inline" and "ltr" respectively.
copy from editor/ui/dialogs/content/EdInsertMath.xul
copy to mail/components/compose/content/dialogs/EdInsertMath.xul
--- a/editor/ui/dialogs/content/EdInsertMath.xul
+++ b/mail/components/compose/content/dialogs/EdInsertMath.xul
@@ -2,31 +2,31 @@
 
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
 - License, v. 2.0. If a copy of the MPL was not distributed with this
 - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorInsertMath.dtd">
+<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/messengercompose/EditorInsertMath.dtd">
 
 <dialog title="&windowTitle.label;"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml"
         onload="Startup();"
         buttonlabelaccept="&insertButton.label;"
         buttonaccesskeyaccept="&insertButton.accesskey;">
 
   <!-- Methods common to all editor dialogs -->
   <script src="chrome://global/content/globalOverlay.js"/>
   <script src="chrome://global/content/editMenuOverlay.js"/>
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdInsertMath.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdInsertMath.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
 
   <label id="srcMessage" value="&sourceEditField.label;"/>
   <html:textarea id="input" rows="5" oninput="updateMath();"
                  placeholder="\sqrt{x_1} + \frac{π^3}{2}"/>
   <vbox flex="1" style="overflow: auto; width: 30em; height: 5em;">
     <description id="output"/>
copy from editor/ui/dialogs/content/EdInsertTOC.js
copy to mail/components/compose/content/dialogs/EdInsertTOC.js
--- a/editor/ui/dialogs/content/EdInsertTOC.js
+++ b/mail/components/compose/content/dialogs/EdInsertTOC.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 // tocHeadersArray is the array containing the pairs tag/class
 // defining TOC entries
 var tocHeadersArray = new Array(6);
 
 // a global used when building the TOC
 var currentHeaderLevel = 0;
copy from editor/ui/dialogs/content/EdInsertTOC.xul
copy to mail/components/compose/content/dialogs/EdInsertTOC.xul
--- a/editor/ui/dialogs/content/EdInsertTOC.xul
+++ b/mail/components/compose/content/dialogs/EdInsertTOC.xul
@@ -2,29 +2,29 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorInsertTOC.dtd">
+<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/messengercompose/EditorInsertTOC.dtd">
 
 <dialog title="&Window.title;"
     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
     xmlns:html="http://www.w3.org/1999/xhtml"
     onload="Startup();"
     oncancel="window.close(); return true;">
 
   <!-- Methods common to all editor dialogs -->
-  <script src="chrome://editor/content/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
 
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdInsertTOC.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdInsertTOC.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
   <spacer id="dummy" style="display:none"/>
   <vbox flex="1">
     <groupbox>
     <hbox class="groupbox-title">
       <label class="header">&buildToc.label;</label>
     </hbox>
copy from editor/ui/dialogs/content/EdInsertTable.js
copy to mail/components/compose/content/dialogs/EdInsertTable.js
--- a/editor/ui/dialogs/content/EdInsertTable.js
+++ b/mail/components/compose/content/dialogs/EdInsertTable.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 // Cancel() is in EdDialogCommon.js
 
 var gTableElement = null;
 var gRows;
 var gColumns;
 var gActiveEditor;
copy from editor/ui/dialogs/content/EdInsertTable.xul
copy to mail/components/compose/content/dialogs/EdInsertTable.xul
--- a/editor/ui/dialogs/content/EdInsertTable.xul
+++ b/mail/components/compose/content/dialogs/EdInsertTable.xul
@@ -3,30 +3,30 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
 <!DOCTYPE dialog [
-<!ENTITY % edInsertTable SYSTEM "chrome://editor/locale/EditorInsertTable.dtd">
+<!ENTITY % edInsertTable SYSTEM "chrome://messenger/locale/messengercompose/EditorInsertTable.dtd">
 %edInsertTable;
-<!ENTITY % edDialogOverlay SYSTEM "chrome://editor/locale/EdDialogOverlay.dtd">
+<!ENTITY % edDialogOverlay SYSTEM "chrome://messenger/locale/messengercompose/EdDialogOverlay.dtd">
 %edDialogOverlay;
 ]>
 
 <dialog title="&windowTitle.label;"
     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
     onload = "Startup()">
 
   <!-- Methods common to all editor dialogs -->
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdInsertTable.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdInsertTable.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
   <groupbox>
     <hbox class="groupbox-title">
       <label class="header">&size.label;</label>
     </hbox>
     <grid>
       <columns>
copy from editor/ui/dialogs/content/EdLabelProps.js
copy to mail/components/compose/content/dialogs/EdLabelProps.js
--- a/editor/ui/dialogs/content/EdLabelProps.js
+++ b/mail/components/compose/content/dialogs/EdLabelProps.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 var labelElement;
 
 // dialog initialization code
 
 document.addEventListener("dialogaccept", onAccept);
 document.addEventListener("dialogcancel", onCancel);
copy from editor/ui/dialogs/content/EdLabelProps.xul
copy to mail/components/compose/content/dialogs/EdLabelProps.xul
--- a/editor/ui/dialogs/content/EdLabelProps.xul
+++ b/mail/components/compose/content/dialogs/EdLabelProps.xul
@@ -2,31 +2,31 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
 <!DOCTYPE dialog [
-<!ENTITY % edLabelProperties SYSTEM "chrome://editor/locale/EditorLabelProperties.dtd">
+<!ENTITY % edLabelProperties SYSTEM "chrome://messenger/locale/messengercompose/EditorLabelProperties.dtd">
 %edLabelProperties;
-<!ENTITY % edDialogOverlay SYSTEM "chrome://editor/locale/EdDialogOverlay.dtd">
+<!ENTITY % edDialogOverlay SYSTEM "chrome://messenger/locale/messengercompose/EdDialogOverlay.dtd">
 %edDialogOverlay;
 ]>
 
 <dialog title="&windowTitle.label;"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
         onload="Startup();"
         buttons="accept,cancel">
 
   <!-- Methods common to all editor dialogs -->
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdLabelProps.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdLabelProps.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
 
   <groupbox>
     <hbox class="groupbox-title">
       <label class="header" accesskey="&Settings.accesskey;">&Settings.label;</label>
     </hbox>
     <grid><columns><column/><column/></columns>
copy from editor/ui/dialogs/content/EdLinkProps.js
copy to mail/components/compose/content/dialogs/EdLinkProps.js
--- a/editor/ui/dialogs/content/EdLinkProps.js
+++ b/mail/components/compose/content/dialogs/EdLinkProps.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 var gActiveEditor;
 var anchorElement = null;
 var imageElement = null;
 var insertNew = false;
 var replaceExistingLink = false;
 var insertLinkAtCaret;
copy from editor/ui/dialogs/content/EdLinkProps.xul
copy to mail/components/compose/content/dialogs/EdLinkProps.xul
--- a/editor/ui/dialogs/content/EdLinkProps.xul
+++ b/mail/components/compose/content/dialogs/EdLinkProps.xul
@@ -3,32 +3,32 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
 <!DOCTYPE dialog [
-<!ENTITY % linkPropertiesDTD SYSTEM "chrome://editor/locale/EditorLinkProperties.dtd">
+<!ENTITY % linkPropertiesDTD SYSTEM "chrome://messenger/locale/messengercompose/EditorLinkProperties.dtd">
 %linkPropertiesDTD;
 <!ENTITY % composeEditorOverlayDTD SYSTEM "chrome://messenger/locale/messengercompose/mailComposeEditorOverlay.dtd">
 %composeEditorOverlayDTD;
-<!ENTITY % edDialogOverlay SYSTEM "chrome://editor/locale/EdDialogOverlay.dtd">
+<!ENTITY % edDialogOverlay SYSTEM "chrome://messenger/locale/messengercompose/EdDialogOverlay.dtd">
 %edDialogOverlay;
 ]>
 
 <dialog id="linkDlg" title="&windowTitle.label;"
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
    onload = "Startup()">
 
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdLinkProps.js"/>
-  <script src="chrome://editor/content/EdImageLinkLoader.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdLinkProps.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdImageLinkLoader.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
 
   <vbox style="min-width: 20em">
     <groupbox>
       <hbox class="groupbox-title">
         <label id="linkTextCaption" class="header"/>
       </hbox>
copy from editor/ui/dialogs/content/EdListProps.js
copy to mail/components/compose/content/dialogs/EdListProps.js
--- a/editor/ui/dialogs/content/EdListProps.js
+++ b/mail/components/compose/content/dialogs/EdListProps.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 // Cancel() is in EdDialogCommon.js
 var gBulletStyleType = "";
 var gNumberStyleType = "";
 var gListElement;
 var gOriginalListType = "";
 var gListType = "";
copy from editor/ui/dialogs/content/EdListProps.xul
copy to mail/components/compose/content/dialogs/EdListProps.xul
--- a/editor/ui/dialogs/content/EdListProps.xul
+++ b/mail/components/compose/content/dialogs/EdListProps.xul
@@ -2,30 +2,30 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
 <!DOCTYPE dialog [
-<!ENTITY % edListProperties SYSTEM "chrome://editor/locale/EditorListProperties.dtd">
+<!ENTITY % edListProperties SYSTEM "chrome://messenger/locale/messengercompose/EditorListProperties.dtd">
 %edListProperties;
-<!ENTITY % edDialogOverlay SYSTEM "chrome://editor/locale/EdDialogOverlay.dtd">
+<!ENTITY % edDialogOverlay SYSTEM "chrome://messenger/locale/messengercompose/EdDialogOverlay.dtd">
 %edDialogOverlay;
 ]>
 
 <dialog title="&windowTitle.label;"
     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
     onload="Startup()">
 
   <!-- Methods common to all editor dialogs -->
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdListProps.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdListProps.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
 
   <groupbox flex="1">
     <hbox class="groupbox-title">
       <label class="header">&ListType.label;</label>
     </hbox>
     <menulist id="ListType" oncommand="SelectListType()">
copy from editor/ui/dialogs/content/EdNamedAnchorProps.js
copy to mail/components/compose/content/dialogs/EdNamedAnchorProps.js
--- a/editor/ui/dialogs/content/EdNamedAnchorProps.js
+++ b/mail/components/compose/content/dialogs/EdNamedAnchorProps.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 var gInsertNew = true;
 var gAnchorElement = null;
 var gOriginalName = "";
 const kTagName = "anchor";
 
 // dialog initialization code
copy from editor/ui/dialogs/content/EdNamedAnchorProps.xul
copy to mail/components/compose/content/dialogs/EdNamedAnchorProps.xul
--- a/editor/ui/dialogs/content/EdNamedAnchorProps.xul
+++ b/mail/components/compose/content/dialogs/EdNamedAnchorProps.xul
@@ -3,30 +3,30 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
 <!DOCTYPE dialog [
-<!ENTITY % edNamedAnchorProperties SYSTEM "chrome://editor/locale/EdNamedAnchorProperties.dtd">
+<!ENTITY % edNamedAnchorProperties SYSTEM "chrome://messenger/locale/messengercompose/EdNamedAnchorProperties.dtd">
 %edNamedAnchorProperties;
-<!ENTITY % edDialogOverlay SYSTEM "chrome://editor/locale/EdDialogOverlay.dtd">
+<!ENTITY % edDialogOverlay SYSTEM "chrome://messenger/locale/messengercompose/EdDialogOverlay.dtd">
 %edDialogOverlay;
 ]>
 
 <dialog title="&windowTitle.label;"
     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
     onload="Startup()">
 
   <!-- Methods common to all editor dialogs -->
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdNamedAnchorProps.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdNamedAnchorProps.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
 
   <label control="nameInput"
          value="&anchorNameEditField.label;"
          accesskey="&anchorNameEditField.accessKey;"/>
   <textbox class="MinWidth20em" id="nameInput" oninput="ChangeName()"
              tooltiptext="&nameInput.tooltip;"/>
copy from editor/ui/dialogs/content/EdPageProps.js
copy to mail/components/compose/content/dialogs/EdPageProps.js
--- a/editor/ui/dialogs/content/EdPageProps.js
+++ b/mail/components/compose/content/dialogs/EdPageProps.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 var gNewTitle = "";
 var gAuthor = "";
 var gDescription = "";
 var gAuthorElement;
 var gDescriptionElement;
 var gInsertNewAuthor = false;
copy from editor/ui/dialogs/content/EdPageProps.xul
copy to mail/components/compose/content/dialogs/EdPageProps.xul
--- a/editor/ui/dialogs/content/EdPageProps.xul
+++ b/mail/components/compose/content/dialogs/EdPageProps.xul
@@ -1,25 +1,25 @@
 <?xml version="1.0"?>
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorPageProperties.dtd">
+<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/messengercompose/EditorPageProperties.dtd">
 
 <dialog title="&windowTitle.label;"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
         onload="Startup();">
 
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdPageProps.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdPageProps.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
   <grid>
     <columns><column flex="1"/><column flex="2"/></columns>
     <rows>
       <row>
         <label value="&location.label;"/>
         <label value="&locationNewPage.label;" id="PageLocation"/>
copy from editor/ui/dialogs/content/EdReplace.js
copy to mail/components/compose/content/dialogs/EdReplace.js
--- a/editor/ui/dialogs/content/EdReplace.js
+++ b/mail/components/compose/content/dialogs/EdReplace.js
@@ -1,15 +1,15 @@
 /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 var gReplaceDialog; // Quick access to document/form elements.
 var gFindInst; // nsIWebBrowserFind that we're going to use
 var gFindService; // Global service which remembers find params
 var gEditor; // the editor we're using
 
 document.addEventListener("dialogaccept", event => {
copy from editor/ui/dialogs/content/EdReplace.xul
copy to mail/components/compose/content/dialogs/EdReplace.xul
--- a/editor/ui/dialogs/content/EdReplace.xul
+++ b/mail/components/compose/content/dialogs/EdReplace.xul
@@ -2,28 +2,28 @@
 
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorReplace.dtd">
+<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/messengercompose/EditorReplace.dtd">
 
 <dialog id="replaceDlg" title="&replaceDialog.title;"
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
    persist="screenX screenY"
    buttons="cancel"
    onload="onLoad()">
 
   <!-- Methods common to all editor dialogs -->
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdReplace.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdReplace.js"/>
   <stringbundle id="findBundle" src="chrome://global/locale/finddialog.properties"/>
 
   <hbox>
     <vbox>
       <spacer class="spacer"/>
       <grid align="start">
         <columns><column/><column/></columns>
         <rows>
copy from editor/ui/dialogs/content/EdSelectProps.js
copy to mail/components/compose/content/dialogs/EdSelectProps.js
--- a/editor/ui/dialogs/content/EdSelectProps.js
+++ b/mail/components/compose/content/dialogs/EdSelectProps.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 // Global variables
 
 var hasValue;
 var oldValue;
 var insertNew;
 var itemArray;
copy from editor/ui/dialogs/content/EdSelectProps.xul
copy to mail/components/compose/content/dialogs/EdSelectProps.xul
--- a/editor/ui/dialogs/content/EdSelectProps.xul
+++ b/mail/components/compose/content/dialogs/EdSelectProps.xul
@@ -2,31 +2,31 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
 <!DOCTYPE dialog [
-<!ENTITY % edSelectProperties SYSTEM "chrome://editor/locale/EditorSelectProperties.dtd">
+<!ENTITY % edSelectProperties SYSTEM "chrome://messenger/locale/messengercompose/EditorSelectProperties.dtd">
 %edSelectProperties;
-<!ENTITY % edDialogOverlay SYSTEM "chrome://editor/locale/EdDialogOverlay.dtd">
+<!ENTITY % edDialogOverlay SYSTEM "chrome://messenger/locale/messengercompose/EdDialogOverlay.dtd">
 %edDialogOverlay;
 ]>
 
 <dialog title="&windowTitle.label;"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
         onload="Startup();"
         buttons="accept,cancel">
 
   <!-- Methods common to all editor dialogs -->
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdSelectProps.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdSelectProps.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
 
   <!-- Setting rows="7" on tree isn't working, equalsize vbox sets tree height. -->
   <vbox equalsize="always">
     <tree id="SelectTree" onselect="treeBoxObject.view.selectionChanged();" onkeyup="onTreeKeyUp(event);">
       <treecols id="SelectCols">
         <treecol id="SelectTextCol" flex="3" label="&TextHeader.label;" primary="true"/>
copy from editor/ui/dialogs/content/EdSpellCheck.js
copy to mail/components/compose/content/dialogs/EdSpellCheck.js
--- a/editor/ui/dialogs/content/EdSpellCheck.js
+++ b/mail/components/compose/content/dialogs/EdSpellCheck.js
@@ -1,15 +1,15 @@
 /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../../../mail/base/content/utilityOverlay.js */
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../../../../base/content/utilityOverlay.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 var { InlineSpellChecker } = ChromeUtils.import(
   "resource://gre/modules/InlineSpellChecker.jsm"
 );
 
 var gMisspelledWord;
 var gSpellChecker = null;
@@ -334,17 +334,17 @@ function AddToDictionary() {
   if (gMisspelledWord) {
     gSpellChecker.AddWordToDictionary(gMisspelledWord);
   }
   NextWord();
 }
 
 function EditDictionary() {
   window.openDialog(
-    "chrome://editor/content/EdDictionary.xul",
+    "chrome://messenger/content/messengercompose/EdDictionary.xul",
     "_blank",
     "chrome,close,titlebar,modal",
     "",
     gMisspelledWord
   );
 }
 
 function SelectLanguage() {
copy from editor/ui/dialogs/content/EdSpellCheck.xul
copy to mail/components/compose/content/dialogs/EdSpellCheck.xul
--- a/editor/ui/dialogs/content/EdSpellCheck.xul
+++ b/mail/components/compose/content/dialogs/EdSpellCheck.xul
@@ -1,28 +1,28 @@
 <?xml version="1.0"?>
 
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorSpellCheck.dtd">
+<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/messengercompose/EditorSpellCheck.dtd">
 
 <!-- dialog containing a control requiring initial setup -->
 <dialog id="spellCheckDlg" buttons="cancel" title="&windowTitle.label;"
     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
     persist="screenX screenY"
     onload="Startup()">
 
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
   <script src="chrome://communicator/content/utilityOverlay.js"/>
-  <script src="chrome://editor/content/EdSpellCheck.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdSpellCheck.js"/>
   <script src="chrome://global/content/contentAreaUtils.js"/>
 
   <stringbundle id="languageBundle" src="chrome://global/locale/languageNames.properties"/>
   <stringbundle id="regionBundle" src="chrome://global/locale/regionNames.properties"/>
 
   <grid>
     <columns>
       <column class="spell-check"/>
copy from editor/ui/dialogs/content/EdTableProps.js
copy to mail/components/compose/content/dialogs/EdTableProps.js
--- a/editor/ui/dialogs/content/EdTableProps.js
+++ b/mail/components/compose/content/dialogs/EdTableProps.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 // Cancel() is in EdDialogCommon.js
 
 var gTableElement;
 var gCellElement;
 var gTableCaptionElement;
 var globalCellElement;
@@ -523,17 +523,17 @@ function GetColorAndUpdate(ColorWellID) 
       colorObj.TableColor = gTableColor;
       break;
     case "cellBackgroundCW":
       colorObj.Type = "Cell";
       colorObj.CellColor = gCellColor;
       break;
   }
   window.openDialog(
-    "chrome://editor/content/EdColorPicker.xul",
+    "chrome://messenger/content/messengercompose/EdColorPicker.xul",
     "_blank",
     "chrome,close,titlebar,modal",
     "",
     colorObj
   );
 
   // User canceled the dialog
   if (colorObj.Cancel) {
copy from editor/ui/dialogs/content/EdTableProps.xul
copy to mail/components/compose/content/dialogs/EdTableProps.xul
--- a/editor/ui/dialogs/content/EdTableProps.xul
+++ b/mail/components/compose/content/dialogs/EdTableProps.xul
@@ -3,35 +3,35 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
 <!DOCTYPE dialog [
-<!ENTITY % edTableProperties SYSTEM "chrome://editor/locale/EditorTableProperties.dtd">
+<!ENTITY % edTableProperties SYSTEM "chrome://messenger/locale/messengercompose/EditorTableProperties.dtd">
 %edTableProperties;
-<!ENTITY % edDialogOverlay SYSTEM "chrome://editor/locale/EdDialogOverlay.dtd">
+<!ENTITY % edDialogOverlay SYSTEM "chrome://messenger/locale/messengercompose/EdDialogOverlay.dtd">
 %edDialogOverlay;
 ]>
 
 <dialog title="&tableWindow.title;"
     id="tableDlg"
     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
     onload="Startup()"
     buttons="accept,extra1,cancel"
     buttonlabelclose="&closeButton.label;"
     buttonlabelextra1="&applyButton.label;"
     buttonaccesskeyextra1="&applyButton.accesskey;">
 
   <!-- Methods common to all editor dialogs -->
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdTableProps.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdTableProps.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
 
   <tabbox id="TabBox">
     <tabs flex="1">
       <tab id="TableTab" label="&tableTab.label;"/>
       <tab id="CellTab" label="&cellTab.label;"/>
     </tabs>
copy from editor/ui/dialogs/content/EdTextAreaProps.js
copy to mail/components/compose/content/dialogs/EdTextAreaProps.js
--- a/editor/ui/dialogs/content/EdTextAreaProps.js
+++ b/mail/components/compose/content/dialogs/EdTextAreaProps.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../composer/content/editorUtilities.js */
+/* import-globals-from ../editorUtilities.js */
 /* import-globals-from EdDialogCommon.js */
 
 var insertNew;
 var textareaElement;
 
 // dialog initialization code
 
 document.addEventListener("dialogaccept", onAccept);
copy from editor/ui/dialogs/content/EdTextAreaProps.xul
copy to mail/components/compose/content/dialogs/EdTextAreaProps.xul
--- a/editor/ui/dialogs/content/EdTextAreaProps.xul
+++ b/mail/components/compose/content/dialogs/EdTextAreaProps.xul
@@ -2,32 +2,32 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
 <?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
 
 <!DOCTYPE dialog [
-<!ENTITY % edTextAreaProperties SYSTEM "chrome://editor/locale/EditorTextAreaProperties.dtd">
+<!ENTITY % edTextAreaProperties SYSTEM "chrome://messenger/locale/messengercompose/EditorTextAreaProperties.dtd">
 %edTextAreaProperties;
-<!ENTITY % edDialogOverlay SYSTEM "chrome://editor/locale/EdDialogOverlay.dtd">
+<!ENTITY % edDialogOverlay SYSTEM "chrome://messenger/locale/messengercompose/EdDialogOverlay.dtd">
 %edDialogOverlay;
 ]>
 
 <dialog title="&windowTitle.label;"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml"
         onload="Startup();"
         buttons="accept,cancel">
 
   <!-- Methods common to all editor dialogs -->
-  <script src="chrome://editor/content/editorUtilities.js"/>
-  <script src="chrome://editor/content/EdDialogCommon.js"/>
-  <script src="chrome://editor/content/EdTextAreaProps.js"/>
+  <script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdDialogCommon.js"/>
+  <script src="chrome://messenger/content/messengercompose/EdTextAreaProps.js"/>
 
   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
 
   <groupbox>
     <hbox class="groupbox-title">
       <label class="header">&Settings.label;</label>
     </hbox>
     <grid><columns><column/><column/></columns>
copy from editor/ui/dialogs/content/edImage.inc.xul
copy to mail/components/compose/content/dialogs/edImage.inc.xul
copy from editor/ui/composer/content/editor.js
copy to mail/components/compose/content/editor.js
--- a/editor/ui/composer/content/editor.js
+++ b/mail/components/compose/content/editor.js
@@ -1,14 +1,14 @@
 /* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../../../mail/base/content/utilityOverlay.js */
+/* import-globals-from ../../../base/content/utilityOverlay.js */
 /* import-globals-from ComposerCommands.js */
 /* import-globals-from editorUtilities.js */
 /* globals InlineSpellCheckerUI */
 
 var { GetNextUntitledValue } = ChromeUtils.import(
   "resource:///modules/editorUtilities.jsm"
 );
 var { Async } = ChromeUtils.import("resource://services-common/async.js");
@@ -33,18 +33,20 @@ const kDisplayModeMenuIDs = [
   "viewPreviewMode",
 ];
 const kDisplayModeTabIDS = [
   "NormalModeButton",
   "TagModeButton",
   "SourceModeButton",
   "PreviewModeButton",
 ];
-const kNormalStyleSheet = "chrome://editor/content/EditorContent.css";
-const kAllTagsStyleSheet = "chrome://editor/content/EditorAllTags.css";
+const kNormalStyleSheet =
+  "chrome://messenger/content/messengercompose/EditorContent.css";
+const kAllTagsStyleSheet =
+  "chrome://messenger/content/messengercompose/EditorAllTags.css";
 const kContentEditableStyleSheet = "resource://gre/res/contenteditable.css";
 
 var kTextMimeType = "text/plain";
 var kHTMLMimeType = "text/html";
 var kXHTMLMimeType = "application/xhtml+xml";
 
 var gPreviousNonSourceDisplayMode = 1;
 var gEditorDisplayMode = -1;
@@ -1523,17 +1525,17 @@ function EditorSelectColor(colorType, mo
 
   if (!useLastColor) {
     // Avoid the JS warning
     gColorObj.NoDefault = false;
 
     // Launch the ColorPicker dialog
     // TODO: Figure out how to position this under the color buttons on the toolbar
     window.openDialog(
-      "chrome://editor/content/EdColorPicker.xul",
+      "chrome://messenger/content/messengercompose/EdColorPicker.xul",
       "_blank",
       "chrome,close,titlebar,modal",
       "",
       gColorObj
     );
 
     // User canceled the dialog
     if (gColorObj.Cancel) {
@@ -2922,17 +2924,17 @@ function IsSelectionInOneCell() {
 }
 
 // Call this with insertAllowed = true to allow inserting if not in existing table,
 //   else use false to do nothing if not in a table
 function EditorInsertOrEditTable(insertAllowed) {
   if (IsInTable()) {
     // Edit properties of existing table
     window.openDialog(
-      "chrome://editor/content/EdTableProps.xul",
+      "chrome://messenger/content/messengercompose/EdTableProps.xul",
       "_blank",
       "chrome,close,titlebar,modal",
       "",
       "TablePanel"
     );
     gContentWindow.focus();
   } else if (insertAllowed) {
     try {
@@ -2945,17 +2947,17 @@ function EditorInsertOrEditTable(insertA
       }
     } catch (e) {}
   }
 }
 
 function EditorInsertTable() {
   // Insert a new table
   window.openDialog(
-    "chrome://editor/content/EdInsertTable.xul",
+    "chrome://messenger/content/messengercompose/EdInsertTable.xul",
     "_blank",
     "chrome,close,titlebar,modal",
     ""
   );
   gContentWindow.focus();
 }
 
 function EditorTableCellProperties() {
@@ -2963,17 +2965,17 @@ function EditorTableCellProperties() {
     return;
   }
 
   try {
     var cell = GetCurrentEditor().getElementOrParentByTagName("td", null);
     if (cell) {
       // Start Table Properties dialog on the "Cell" panel
       window.openDialog(
-        "chrome://editor/content/EdTableProps.xul",
+        "chrome://messenger/content/messengercompose/EdTableProps.xul",
         "_blank",
         "chrome,close,titlebar,modal",
         "",
         "CellPanel"
       );
       gContentWindow.focus();
     }
   } catch (e) {}
@@ -3114,17 +3116,17 @@ function EditorFindOrCreateInsertCharWin
     // Since we switch the dialog during EditorOnFocus(),
     //   this should really never be found, but it's good to be sure
     var windowWithDialog = FindEditorWithInsertCharDialog();
     if (windowWithDialog) {
       SwitchInsertCharToThisWindow(windowWithDialog);
     } else {
       // The dialog will set window.InsertCharWindow to itself
       window.openDialog(
-        "chrome://editor/content/EdInsertChars.xul",
+        "chrome://messenger/content/messengercompose/EdInsertChars.xul",
         "_blank",
         "chrome,close,titlebar",
         ""
       );
     }
   }
 }
 
@@ -3390,17 +3392,17 @@ function FillInHTMLTooltipEditor(tooltip
       }
     }
   }
   return false;
 }
 
 function UpdateTOC() {
   window.openDialog(
-    "chrome://editor/content/EdInsertTOC.xul",
+    "chrome://messenger/content/messengercompose/EdInsertTOC.xul",
     "_blank",
     "chrome,close,modal,titlebar"
   );
   window.content.focus();
 }
 
 function InitTOCMenu() {
   var elt = GetCurrentEditor().document.getElementById("mozToc");
copy from editor/ui/composer/content/editorUtilities.js
copy to mail/components/compose/content/editorUtilities.js
--- a/editor/ui/composer/content/editorUtilities.js
+++ b/mail/components/compose/content/editorUtilities.js
@@ -57,33 +57,33 @@ function ConfirmWithTitle(title, message
 }
 
 /** *********** String Utilities ***************/
 
 function GetString(name) {
   if (!gStringBundle) {
     try {
       gStringBundle = Services.strings.createBundle(
-        "chrome://editor/locale/editor.properties"
+        "chrome://messenger/locale/messengercompose/editor.properties"
       );
     } catch (ex) {}
   }
   if (gStringBundle) {
     try {
       return gStringBundle.GetStringFromName(name);
     } catch (e) {}
   }
   return null;
 }
 
 function GetFormattedString(aName, aVal) {
   if (!gStringBundle) {
     try {
       gStringBundle = Services.strings.createBundle(
-        "chrome://editor/locale/editor.properties"
+        "chrome://messenger/locale/messengercompose/editor.properties"
       );
     } catch (ex) {}
   }
   if (gStringBundle) {
     try {
       return gStringBundle.formatStringFromName(aName, [aVal]);
     } catch (e) {}
   }
copy from editor/ui/composer/content/images/tag-anchor.gif
copy to mail/components/compose/content/images/tag-anchor.gif
--- a/mail/components/compose/content/messengercompose.xul
+++ b/mail/components/compose/content/messengercompose.xul
@@ -21,17 +21,17 @@
   <!ENTITY % textcontextDTD SYSTEM "chrome://global/locale/textcontext.dtd">
   %textcontextDTD;
   <!ENTITY % viewZoomOverlayDTD SYSTEM "chrome://messenger/locale/viewZoomOverlay.dtd">
   %viewZoomOverlayDTD;
   <!ENTITY % baseMenuOverlayDTD SYSTEM "chrome://messenger/locale/baseMenuOverlay.dtd">
   %baseMenuOverlayDTD;
   <!ENTITY % msgCompSMIMEDTD SYSTEM "chrome://messenger-smime/locale/msgCompSMIMEOverlay.dtd">
   %msgCompSMIMEDTD;
-  <!ENTITY % editorOverlayDTD SYSTEM "chrome://editor/locale/editorOverlay.dtd">
+  <!ENTITY % editorOverlayDTD SYSTEM "chrome://messenger/locale/messengercompose/editorOverlay.dtd">
   %editorOverlayDTD;
   <!ENTITY % utilityOverlayDTD SYSTEM
     "chrome://communicator/locale/utilityOverlay.dtd">
   %utilityOverlayDTD;
 ]>
 
 <window id="msgcomposeWindow"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
@@ -61,19 +61,19 @@
   <html:link rel="localization" href="toolkit/main-window/findbar.ftl"/>
   <html:link rel="localization" href="messenger/menubar.ftl"/>
 </linkset>
 
 <script src="chrome://global/content/printUtils.js"/>
 <script src="chrome://messenger/content/accountUtils.js"/>
 <script src="chrome://messenger/content/mailCore.js"/>
 <script src="chrome://communicator/content/contentAreaClick.js"/>
-<script src="chrome://editor/content/editor.js"/>
-<script src="chrome://editor/content/editorUtilities.js"/>
-<script src="chrome://editor/content/ComposerCommands.js"/>
+<script src="chrome://messenger/content/messengercompose/editor.js"/>
+<script src="chrome://messenger/content/messengercompose/editorUtilities.js"/>
+<script src="chrome://messenger/content/messengercompose/ComposerCommands.js"/>
 <script src="chrome://messenger/content/button-menu-button.js"/>
 <script src="chrome://messenger/content/messengercompose/MsgComposeCommands.js"/>
 <script src="chrome://messenger/content/messengercompose/bigFileObserver.js"/>
 <script src="chrome://messenger/content/messengercompose/cloudAttachmentLinkManager.js"/>
 <script src="chrome://messenger/content/messenger-customization.js"/>
 <script src="chrome://messenger/content/customizable-toolbar.js"/>
 
 <!-- drag and drop -->
copy from editor/ui/editorUtilities.jsm
copy to mail/components/compose/editorUtilities.jsm
--- a/mail/components/compose/jar.mn
+++ b/mail/components/compose/jar.mn
@@ -1,10 +1,77 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 messenger.jar:
-*   content/messenger/messengercompose/messengercompose.xul        (content/messengercompose.xul)
-    content/messenger/messengercompose/MsgComposeCommands.js       (content/MsgComposeCommands.js)
-    content/messenger/messengercompose/bigFileObserver.js          (content/bigFileObserver.js)
+*   content/messenger/messengercompose/messengercompose.xul          (content/messengercompose.xul)
+    content/messenger/messengercompose/MsgComposeCommands.js         (content/MsgComposeCommands.js)
+    content/messenger/messengercompose/bigFileObserver.js            (content/bigFileObserver.js)
     content/messenger/messengercompose/cloudAttachmentLinkManager.js (content/cloudAttachmentLinkManager.js)
-    content/messenger/messengercompose/addressingWidgetOverlay.js  (content/addressingWidgetOverlay.js)
+    content/messenger/messengercompose/addressingWidgetOverlay.js    (content/addressingWidgetOverlay.js)
+    content/messenger/messengercompose/editor.js                     (content/editor.js)
+    content/messenger/messengercompose/editorUtilities.js            (content/editorUtilities.js)
+    content/messenger/messengercompose/ComposerCommands.js           (content/ComposerCommands.js)
+    content/messenger/messengercompose/EditorContent.css             (content/EditorContent.css)
+    content/messenger/messengercompose/images/tag-anchor.gif         (content/images/tag-anchor.gif)
+    content/messenger/messengercompose/EdDialogCommon.js             (content/dialogs/EdDialogCommon.js)
+    content/messenger/messengercompose/EdLinkProps.xul               (content/dialogs/EdLinkProps.xul)
+    content/messenger/messengercompose/EdLinkProps.js                (content/dialogs/EdLinkProps.js)
+*   content/messenger/messengercompose/EdImageProps.xul              (content/dialogs/EdImageProps.xul)
+    content/messenger/messengercompose/EdImageProps.js               (content/dialogs/EdImageProps.js)
+    content/messenger/messengercompose/EdImageLinkLoader.js          (content/dialogs/EdImageLinkLoader.js)
+    content/messenger/messengercompose/EdImageDialog.js              (content/dialogs/EdImageDialog.js)
+    content/messenger/messengercompose/EdHLineProps.xul              (content/dialogs/EdHLineProps.xul)
+    content/messenger/messengercompose/EdHLineProps.js               (content/dialogs/EdHLineProps.js)
+    content/messenger/messengercompose/EdReplace.xul                 (content/dialogs/EdReplace.xul)
+    content/messenger/messengercompose/EdReplace.js                  (content/dialogs/EdReplace.js)
+    content/messenger/messengercompose/EdSpellCheck.xul              (content/dialogs/EdSpellCheck.xul)
+    content/messenger/messengercompose/EdSpellCheck.js               (content/dialogs/EdSpellCheck.js)
+    content/messenger/messengercompose/EdDictionary.xul              (content/dialogs/EdDictionary.xul)
+    content/messenger/messengercompose/EdDictionary.js               (content/dialogs/EdDictionary.js)
+    content/messenger/messengercompose/EdNamedAnchorProps.xul        (content/dialogs/EdNamedAnchorProps.xul)
+    content/messenger/messengercompose/EdNamedAnchorProps.js         (content/dialogs/EdNamedAnchorProps.js)
+    content/messenger/messengercompose/EdInsertTOC.xul               (content/dialogs/EdInsertTOC.xul)
+    content/messenger/messengercompose/EdInsertTOC.js                (content/dialogs/EdInsertTOC.js)
+    content/messenger/messengercompose/EdInsertTable.xul             (content/dialogs/EdInsertTable.xul)
+    content/messenger/messengercompose/EdInsertTable.js              (content/dialogs/EdInsertTable.js)
+    content/messenger/messengercompose/EdInsertMath.xul              (content/dialogs/EdInsertMath.xul)
+    content/messenger/messengercompose/EdInsertMath.js               (content/dialogs/EdInsertMath.js)
+    content/messenger/messengercompose/EdTableProps.xul              (content/dialogs/EdTableProps.xul)
+    content/messenger/messengercompose/EdTableProps.js               (content/dialogs/EdTableProps.js)
+    content/messenger/messengercompose/EdFormProps.xul               (content/dialogs/EdFormProps.xul)
+    content/messenger/messengercompose/EdFormProps.js                (content/dialogs/EdFormProps.js)
+    content/messenger/messengercompose/EdInputProps.xul              (content/dialogs/EdInputProps.xul)
+    content/messenger/messengercompose/EdInputProps.js               (content/dialogs/EdInputProps.js)
+*   content/messenger/messengercompose/EdInputImage.xul              (content/dialogs/EdInputImage.xul)
+    content/messenger/messengercompose/EdInputImage.js               (content/dialogs/EdInputImage.js)
+    content/messenger/messengercompose/EdTextAreaProps.xul           (content/dialogs/EdTextAreaProps.xul)
+    content/messenger/messengercompose/EdTextAreaProps.js            (content/dialogs/EdTextAreaProps.js)
+    content/messenger/messengercompose/EdSelectProps.xul             (content/dialogs/EdSelectProps.xul)
+    content/messenger/messengercompose/EdSelectProps.js              (content/dialogs/EdSelectProps.js)
+    content/messenger/messengercompose/EdButtonProps.xul             (content/dialogs/EdButtonProps.xul)
+    content/messenger/messengercompose/EdButtonProps.js              (content/dialogs/EdButtonProps.js)
+    content/messenger/messengercompose/EdLabelProps.xul              (content/dialogs/EdLabelProps.xul)
+    content/messenger/messengercompose/EdLabelProps.js               (content/dialogs/EdLabelProps.js)
+    content/messenger/messengercompose/EdFieldSetProps.xul           (content/dialogs/EdFieldSetProps.xul)
+    content/messenger/messengercompose/EdFieldSetProps.js            (content/dialogs/EdFieldSetProps.js)
+    content/messenger/messengercompose/EdInsSrc.xul                  (content/dialogs/EdInsSrc.xul)
+    content/messenger/messengercompose/EdInsSrc.js                   (content/dialogs/EdInsSrc.js)
+    content/messenger/messengercompose/EdInsertChars.xul             (content/dialogs/EdInsertChars.xul)
+    content/messenger/messengercompose/EdInsertChars.js              (content/dialogs/EdInsertChars.js)
+    content/messenger/messengercompose/EdAdvancedEdit.xul            (content/dialogs/EdAdvancedEdit.xul)
+    content/messenger/messengercompose/EdAdvancedEdit.js             (content/dialogs/EdAdvancedEdit.js)
+    content/messenger/messengercompose/EdListProps.xul               (content/dialogs/EdListProps.xul)
+    content/messenger/messengercompose/EdListProps.js                (content/dialogs/EdListProps.js)
+    content/messenger/messengercompose/EdPageProps.xul               (content/dialogs/EdPageProps.xul)
+    content/messenger/messengercompose/EdPageProps.js                (content/dialogs/EdPageProps.js)
+    content/messenger/messengercompose/EdColorProps.xul              (content/dialogs/EdColorProps.xul)
+    content/messenger/messengercompose/EdColorProps.js               (content/dialogs/EdColorProps.js)
+    content/messenger/messengercompose/EdColorPicker.xul             (content/dialogs/EdColorPicker.xul)
+    content/messenger/messengercompose/EdColorPicker.js              (content/dialogs/EdColorPicker.js)
+    content/messenger/messengercompose/EdAECSSAttributes.js          (content/dialogs/EdAECSSAttributes.js)
+    content/messenger/messengercompose/EdAEHTMLAttributes.js         (content/dialogs/EdAEHTMLAttributes.js)
+    content/messenger/messengercompose/EdAEJSEAttributes.js          (content/dialogs/EdAEJSEAttributes.js)
+    content/messenger/messengercompose/EdAEAttributes.js             (content/dialogs/EdAEAttributes.js)
+    content/messenger/messengercompose/EdConvertToTable.xul          (content/dialogs/EdConvertToTable.xul)
+    content/messenger/messengercompose/EdConvertToTable.js           (content/dialogs/EdConvertToTable.js)
+    content/messenger/messengercompose/TeXZilla.js                   (texzilla/TeXZilla.js)
--- a/mail/components/compose/moz.build
+++ b/mail/components/compose/moz.build
@@ -1,8 +1,16 @@
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 JAR_MANIFESTS += ['jar.mn']
 
+EXTRA_JS_MODULES += [
+    'editorUtilities.jsm',
+]
+
+JS_PREFERENCE_PP_FILES += [
+    'composer.js'
+]
+
 DEFINES['TOOLKIT_DIR'] = "%s/toolkit" % (CONFIG['moztopsrcdir'],)
copy from editor/ui/texzilla/content/TeXZilla.js
copy to mail/components/compose/texzilla/TeXZilla.js
--- a/mail/components/preferences/doctype.inc.xul
+++ b/mail/components/preferences/doctype.inc.xul
@@ -8,17 +8,17 @@
 <!ENTITY % preferencesDTD SYSTEM "chrome://messenger/locale/preferences/preferences.dtd">
 %preferencesDTD;
 <!ENTITY % generalDTD SYSTEM "chrome://messenger/locale/preferences/general.dtd" >
 %generalDTD;
 <!ENTITY % displayDTD SYSTEM "chrome://messenger/locale/preferences/display.dtd" >
 %displayDTD;
 <!ENTITY % composeDTD SYSTEM "chrome://messenger/locale/preferences/compose.dtd">
 %composeDTD;
-<!ENTITY % editorOverlayDTD SYSTEM "chrome://editor/locale/editorOverlay.dtd">
+<!ENTITY % editorOverlayDTD SYSTEM "chrome://messenger/locale/messengercompose/editorOverlay.dtd">
 %editorOverlayDTD;
 <!ENTITY % chatDTD SYSTEM "chrome://messenger/locale/preferences/chat.dtd">
 %chatDTD;
 <!ENTITY % privacyDTD SYSTEM "chrome://messenger/locale/preferences/privacy.dtd">
 %privacyDTD;
 <!ENTITY % securityDTD SYSTEM "chrome://messenger/locale/preferences/security.dtd">
 %securityDTD;
 <!ENTITY % applicationsDTD SYSTEM "chrome://messenger/locale/preferences/applications.dtd">
--- a/mail/locales/Makefile.in
+++ b/mail/locales/Makefile.in
@@ -70,17 +70,16 @@ libs-%:
 # merge if we're not en-US. Conditional function because
 # we need the current value of AB_CD.
 	$(if $(filter en-US,$(AB_CD)),, @$(MAKE) merge-$*)
 	$(NSINSTALL) -D $(DIST)/install
 	@$(MAKE) -C $(DEPTH)/toolkit/locales libs-$*  XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
 	@$(MAKE) -C $(DEPTH)/devtools/client/locales AB_CD=$* XPI_NAME=locale-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
 	@$(MAKE) -C $(DEPTH)/devtools/startup/locales AB_CD=$* XPI_NAME=locale-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
 	@$(MAKE) -C ../../chat/locales AB_CD=$* XPI_NAME=locale-$*
-	@$(MAKE) -C ../../editor/ui/locales AB_CD=$* XPI_NAME=locale-$*
 ifdef MOZ_CALENDAR
 	@$(MAKE) -C ../../calendar/locales AB_CD=$* XPI_NAME=locale-$*
 endif
 	@$(MAKE) -C $(DEPTH)/extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$*
 	@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref
 	@$(MAKE) multilocale.txt-$* AB_CD=$* XPI_NAME=locale-$*
 	@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$*
 
copy from editor/ui/locales/en-US/chrome/dialogs/EdAdvancedEdit.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EdAdvancedEdit.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EdColorPicker.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EdColorPicker.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EdConvertToTable.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EdConvertToTable.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EdDialogOverlay.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EdDialogOverlay.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EdNamedAnchorProperties.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EdNamedAnchorProperties.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EditorButtonProperties.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EditorButtonProperties.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EditorColorProperties.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EditorColorProperties.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EditorFieldSetProperties.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EditorFieldSetProperties.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EditorFormProperties.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EditorFormProperties.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EditorHLineProperties.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EditorHLineProperties.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EditorImageProperties.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EditorImageProperties.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EditorInputProperties.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EditorInputProperties.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EditorInsertChars.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EditorInsertChars.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EditorInsertMath.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EditorInsertMath.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EditorInsertSource.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EditorInsertSource.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EditorInsertTOC.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EditorInsertTOC.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EditorInsertTable.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EditorInsertTable.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EditorLabelProperties.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EditorLabelProperties.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EditorLinkProperties.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EditorLinkProperties.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EditorListProperties.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EditorListProperties.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EditorPersonalDictionary.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EditorPersonalDictionary.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EditorReplace.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EditorReplace.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EditorSelectProperties.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EditorSelectProperties.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EditorSpellCheck.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EditorSpellCheck.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EditorTableProperties.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EditorTableProperties.dtd
copy from editor/ui/locales/en-US/chrome/dialogs/EditorTextAreaProperties.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/EditorTextAreaProperties.dtd
copy from editor/ui/locales/en-US/chrome/composer/editor.properties
copy to mail/locales/en-US/chrome/messenger/messengercompose/editor.properties
copy from editor/ui/locales/en-US/chrome/composer/editorOverlay.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/editorOverlay.dtd
copy from editor/ui/locales/en-US/chrome/composer/editorSmileyOverlay.dtd
copy to mail/locales/en-US/chrome/messenger/messengercompose/editorSmileyOverlay.dtd
--- a/mail/locales/filter.py
+++ b/mail/locales/filter.py
@@ -1,14 +1,14 @@
 def test(mod, path, entity=None):
   import re
   # ignore anything but Thunderbird
   if mod not in ("netwerk", "dom", "toolkit", "security/manager",
                  "devtools/shared", "devtools/client",
-                 "mail", "chat", "editor/ui", "extensions/spellcheck",
+                 "mail", "chat", "extensions/spellcheck",
                  "other-licenses/branding/thunderbird",
                  "mail/branding/thunderbird"):
     return "ignore"
 
   # ignore MOZ_LANGPACK_CONTRIBUTORS
   if mod == "mail" and path == "defines.inc" and \
      entity == "MOZ_LANGPACK_CONTRIBUTORS":
     return "ignore"
--- a/mail/locales/jar.mn
+++ b/mail/locales/jar.mn
@@ -157,16 +157,45 @@
   locale/@AB_CD@/messenger/addressbook/replicationProgress.properties   (%chrome/messenger/addressbook/replicationProgress.properties)
   locale/@AB_CD@/messenger/messengercompose/messengercompose.dtd        (%chrome/messenger/messengercompose/messengercompose.dtd)
   locale/@AB_CD@/messenger/messengercompose/askSendFormat.dtd           (%chrome/messenger/messengercompose/askSendFormat.dtd)
   locale/@AB_CD@/messenger/messengercompose/askSendFormat.properties    (%chrome/messenger/messengercompose/askSendFormat.properties)
   locale/@AB_CD@/messenger/messengercompose/sendProgress.dtd            (%chrome/messenger/messengercompose/sendProgress.dtd)
   locale/@AB_CD@/messenger/messengercompose/sendProgress.properties     (%chrome/messenger/messengercompose/sendProgress.properties)
   locale/@AB_CD@/messenger/messengercompose/composeMsgs.properties      (%chrome/messenger/messengercompose/composeMsgs.properties)
   locale/@AB_CD@/messenger/messengercompose/mailComposeEditorOverlay.dtd (%chrome/messenger/messengercompose/mailComposeEditorOverlay.dtd)
+  locale/@AB_CD@/messenger/messengercompose/editorSmileyOverlay.dtd     (%chrome/messenger/messengercompose/editorSmileyOverlay.dtd)
+  locale/@AB_CD@/messenger/messengercompose/editorOverlay.dtd           (%chrome/messenger/messengercompose/editorOverlay.dtd)
+  locale/@AB_CD@/messenger/messengercompose/editor.properties           (%chrome/messenger/messengercompose/editor.properties)
+  locale/@AB_CD@/messenger/messengercompose/EditorHLineProperties.dtd   (%chrome/messenger/messengercompose/EditorHLineProperties.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EditorImageProperties.dtd   (%chrome/messenger/messengercompose/EditorImageProperties.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EditorInsertSource.dtd      (%chrome/messenger/messengercompose/EditorInsertSource.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EditorInsertMath.dtd        (%chrome/messenger/messengercompose/EditorInsertMath.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EditorInsertChars.dtd       (%chrome/messenger/messengercompose/EditorInsertChars.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EditorInsertTable.dtd       (%chrome/messenger/messengercompose/EditorInsertTable.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EditorInsertTOC.dtd         (%chrome/messenger/messengercompose/EditorInsertTOC.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EditorLinkProperties.dtd    (%chrome/messenger/messengercompose/EditorLinkProperties.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EditorListProperties.dtd    (%chrome/messenger/messengercompose/EditorListProperties.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EditorColorProperties.dtd   (%chrome/messenger/messengercompose/EditorColorProperties.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EdColorPicker.dtd           (%chrome/messenger/messengercompose/EdColorPicker.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EditorReplace.dtd           (%chrome/messenger/messengercompose/EditorReplace.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EditorSpellCheck.dtd        (%chrome/messenger/messengercompose/EditorSpellCheck.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EditorPersonalDictionary.dtd (%chrome/messenger/messengercompose/EditorPersonalDictionary.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EditorTableProperties.dtd   (%chrome/messenger/messengercompose/EditorTableProperties.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EditorFormProperties.dtd    (%chrome/messenger/messengercompose/EditorFormProperties.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EditorInputProperties.dtd   (%chrome/messenger/messengercompose/EditorInputProperties.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EditorTextAreaProperties.dtd (%chrome/messenger/messengercompose/EditorTextAreaProperties.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EditorSelectProperties.dtd  (%chrome/messenger/messengercompose/EditorSelectProperties.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EditorButtonProperties.dtd  (%chrome/messenger/messengercompose/EditorButtonProperties.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EditorLabelProperties.dtd   (%chrome/messenger/messengercompose/EditorLabelProperties.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EditorFieldSetProperties.dtd (%chrome/messenger/messengercompose/EditorFieldSetProperties.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EdNamedAnchorProperties.dtd (%chrome/messenger/messengercompose/EdNamedAnchorProperties.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EdDialogOverlay.dtd         (%chrome/messenger/messengercompose/EdDialogOverlay.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EdAdvancedEdit.dtd          (%chrome/messenger/messengercompose/EdAdvancedEdit.dtd)
+  locale/@AB_CD@/messenger/messengercompose/EdConvertToTable.dtd        (%chrome/messenger/messengercompose/EdConvertToTable.dtd)
   locale/@AB_CD@/messenger/preferences/preferences.dtd                  (%chrome/messenger/preferences/preferences.dtd)
   locale/@AB_CD@/messenger/preferences/general.dtd                      (%chrome/messenger/preferences/general.dtd)
   #ifdef XP_MACOSX
   locale/@AB_CD@/messenger/preferences/dockoptions.dtd                  (%chrome/messenger/preferences/dockoptions.dtd)
   #endif
   locale/@AB_CD@/messenger/preferences/display.dtd                      (%chrome/messenger/preferences/display.dtd)
   locale/@AB_CD@/messenger/preferences/colors.dtd                       (%chrome/messenger/preferences/colors.dtd)
   locale/@AB_CD@/messenger/preferences/chat.dtd                         (%chrome/messenger/preferences/chat.dtd)
--- a/mail/locales/l10n-beta.ini
+++ b/mail/locales/l10n-beta.ini
@@ -2,17 +2,16 @@
 depth = ../..
 all = mail/locales/all-locales
 
 [compare]
 dirs = mail
     chat
     other-licenses/branding/thunderbird
     mail/branding/thunderbird
-    editor/ui
 
 [includes]
 # non-central apps might want to use %(topsrcdir)s here, or other vars
 # RFE: that needs to be supported by compare-locales, too, though
 toolkit = mozilla/toolkit/locales/l10n.ini
 devtools_client = mozilla/devtools/client/locales/l10n.ini
 
 [include_toolkit]
--- a/mail/locales/l10n-central.ini
+++ b/mail/locales/l10n-central.ini
@@ -2,17 +2,16 @@
 depth = ../..
 all = mail/locales/all-locales
 
 [compare]
 dirs = mail
     chat
     other-licenses/branding/thunderbird
     mail/branding/thunderbird
-    editor/ui
 
 [includes]
 # non-central apps might want to use %(topsrcdir)s here, or other vars
 # RFE: that needs to be supported by compare-locales, too, though
 toolkit = mozilla/toolkit/locales/l10n.ini
 devtools_client = mozilla/devtools/client/locales/l10n.ini
 
 [include_toolkit]
--- a/mail/locales/l10n.ini
+++ b/mail/locales/l10n.ini
@@ -2,16 +2,15 @@
 depth = ../..
 all = mail/locales/all-locales
 
 [compare]
 dirs = mail
     chat
     other-licenses/branding/thunderbird
     mail/branding/thunderbird
-    editor/ui
 
 [includes]
 # include toolkit from mozilla.
 # Don't specify which, use l10n-central.ini and friends if you're
 # not working on a local check-out
 toolkit = mozilla/toolkit/locales/l10n.ini
 devtools_client = mozilla/devtools/client/locales/l10n.ini