rem: dialog.linkMessage.data = selectedText; 
add: linkMessage.data = selectedText; 
context: function initDialog(){  // Get a single selected anchor element  anchorElement = editorShell.GetSelectedElement(tagName);  selection = editorShell.editorSelection;  if (selection) {    dump("There is a selection: collapsed = "+selection.isCollapsed+"\n");  } else {    dump("Failed to get selection\n");  }  if (anchorElement) {    dump("found anchor element\n");    // We found an element and don't need to insert one    insertNew = false;  } else {    // See if we have a selected image instead of text    imageElement = editorShell.GetSelectedElement("img");    if (imageElement) {      // See if the image is a child of a link      dump("Image element found - check if its a link...\n");      dump("Image Parent="+parent);      parent = imageElement.parentNode;        dump("Parent="+parent+" nodeName="+parent.nodeName+"\n");      if (parent) {        anchorElement = parent;        insertNew = false;        // Link source string is the source URL of image        // TODO: THIS STILL DOESN'T HANDLE MULTIPLE SELECTED IMAGES!        dialog.linkMessage.data = imageElement.getAttribute("src");;      }    } else {      // We don't have an element selected,       //  so create one with default attributes      dump("Element not selected - calling createElementWithDefaults\n");      anchorElement = editorShell.CreateElementWithDefaults(tagName);      // We will insert a new link at caret location if there's no selection      // TODO: This isn't entirely correct. If selection doesn't have any text      //   or an image, then shouldn't we clear the selection and insert new text?      insertNew = selection.isCollapsed;      dump("insertNew is " + insertNew + "\n");    }  }  if(!anchorElement)  {    dump("Failed to get selected element or create a new one!\n");    window.close();  } else if (!insertNew && !imageElement) {    // Replace the link message with the link source string    selectedText = GetSelectionAsText();    if (selectedText.length > 0) {      // Use just the first 50 characters and add "..."      selectedText = TruncateStringAtWordEnd(selectedText, 50, true);    } else {      dump("Selected text for link source not found. Non-text elements selected?\n");    }    dialog.linkMessage.data = selectedText;  }  if (!selection.isCollapsed)  {    // HREF is a weird case: If selection extends beyond    //   the link, user probably wants to extend link to     //   entire selection.    // TODO: If there was already a link,     //   we need to know if selection extends beyond existing    //   link text before we should do this    insertLinkAroundSelection = true;    dump("insertLinkAroundSelection is TRUE\n");  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/5a825a37267b8407d62d47f7bb1a309af5a3f2d8/EdLinkProps.js/buggy/editor/ui/dialogs/content/EdLinkProps.js