var a = dojo.withGlobal(this.editor.window, "getAncestorElement", dijit._editor.selection, [this.tag]); var url, text; if(a){ url = a.getAttribute('_djrealurl'); text = this.tag == 'img' ? a.getAttribute('alt') : a.textContent || a.innerText; dojo.withGlobal(this.editor.window, "selectElement", dijit._editor.selection, [a, true]); }else{ text = dojo.withGlobal(this.editor.window, dijit._editor.selection.getSelectedText); } // FIXME: IE is *really* b0rken if(dojo.isIE){ this._savedSelection = this.editor._getBookmark(); } this.dropDown.reset(); this.dropDown.setValues({urlInput: url || '', textInput: text || ''}); //dijit.focus(this.urlInput);