YUI: Editor: Patch for SF #2148297
Editor: Patch for SF #
2148477
Download the patch file:
source
-
min
The Javascript
(function() { var Dom = YAHOO.util.Dom, Event = YAHOO.util.Event; YAHOO.widget.Editor.prototype._renderCreateLinkWindow = function() { var str = '
' + this.STR_LINK_URL + ':
'; str += '
' + this.STR_LINK_NEW_WINDOW + '
'; str += '
' + this.STR_LINK_TITLE + ':
'; var body = document.createElement('div'); body.innerHTML = str; var unlinkCont = document.createElement('div'); unlinkCont.className = 'removeLink'; var unlink = document.createElement('a'); unlink.href = '#'; unlink.innerHTML = this.STR_LINK_PROP_REMOVE; unlink.title = this.STR_LINK_PROP_REMOVE; Event.on(unlink, 'click', function(ev) { Event.stopEvent(ev); this.unsubscribeAll('afterExecCommand'); this.execCommand('unlink'); this.closeWindow(); }, this, true); unlinkCont.appendChild(unlink); body.appendChild(unlinkCont); this._windows.createlink = {}; this._windows.createlink.body = body; body.style.display = 'none'; this.get('panel').editor_form.appendChild(body); this.fireEvent('windowCreateLinkRender', { type: 'windowCreateLinkRender', panel: this.get('panel'), body: body }); return body; }; })();