/* 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 EdDialogCommon.js */ var gActiveEditor; var anchorElement = null; var imageElement = null; var insertNew = false; var replaceExistingLink = false; var insertLinkAtCaret; var needLinkText = false; var href; var newLinkText; var gHNodeArray = {}; var gHaveNamedAnchors = false; var gHaveHeadings = false; var gCanChangeHeadingSelected = true; var gCanChangeAnchorSelected = true; // NOTE: Use "href" instead of "a" to distinguish from Named Anchor // The returned node is has an "a" tagName var tagName = "href"; // dialog initialization code document.addEventListener("dialogaccept", onAccept); document.addEventListener("dialogcancel", onCancel); function Startup() { gActiveEditor = GetCurrentEditor(); if (!gActiveEditor) { dump("Failed to get active editor!\n"); window.close(); return; } // Message was wrapped in a