document.getElementById('popupurl').style.width = '180px';\r
\r
elm = inst.dom.getParent(elm, "A");\r
+ if (elm == null) {\r
+ var prospect = inst.dom.create("p", null, inst.selection.getContent());\r
+ if (prospect.childNodes.length === 1) {\r
+ elm = prospect.firstChild;\r
+ }\r
+ }\r
+\r
if (elm != null && elm.nodeName == "A")\r
action = "update";\r
\r
var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';');\r
var html = '';\r
\r
- html += '<select id="' + elm_id + '" name="' + elm_id + '" onf2ocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';\r
+ html += '<select id="' + elm_id + '" name="' + elm_id + '" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';\r
html += 'this.options[this.selectedIndex].value;">';\r
html += '<option value="_self">' + tinyMCEPopup.getLang('advlink_dlg.target_same') + '</option>';\r
html += '<option value="_blank">' + tinyMCEPopup.getLang('advlink_dlg.target_blank') + ' (_blank)</option>';\r