1 line
1.1 KiB
JavaScript
1 line
1.1 KiB
JavaScript
Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons"),Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveLink=function(t){Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveLink.initializeBase(this,[t])},Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveLink.prototype={callMethod:function(){if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveLink.callBaseMethod(this,"callMethod"))return!1;var t=this._designPanel,e=t._getSelection(),o=(t._createRange(e),Sys.Extended.UI.HtmlEditor.getSelParent(t));for(3==o.nodeType&&(o=o.parentNode);o&&Sys.Extended.UI.HtmlEditor.isStyleTag(o.tagName)&&"A"!=o.tagName.toUpperCase();)o=o.parentNode;if(o&&"A"==o.tagName.toUpperCase()){t._saveContent();for(var n=o.firstChild;o.firstChild;)o.parentNode.insertBefore(o.firstChild,o);o.parentNode.removeChild(o),n&&Sys.Extended.UI.HtmlEditor._setCursor(n,t),setTimeout(function(){t._editPanel.updateToolbar()},0),t.onContentChanged()}}},Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveLink.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveLink",Sys.Extended.UI.HtmlEditor.ToolbarButtons.MethodButton); |