Files
SIG/Scripts/AjaxControlToolkit/Release/HtmlEditor.ToolbarButtons.RemoveLink.js
rrene 927295c7ba Revert "-- corr"
This reverts commit 5315c47fcd.
2024-11-05 10:55:34 -07:00

1 line
1.1 KiB
JavaScript

Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons");Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveLink=function(n){Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveLink.initializeBase(this,[n])};Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveLink.prototype={callMethod:function(){var i;if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.RemoveLink.callBaseMethod(this,"callMethod"))return!1;var t=this._designPanel,r=t._getSelection(),u=t._createRange(r),n=Sys.Extended.UI.HtmlEditor.getSelParent(t);for(n.nodeType==3&&(n=n.parentNode);n&&Sys.Extended.UI.HtmlEditor.isStyleTag(n.tagName)&&n.tagName.toUpperCase()!="A";)n=n.parentNode;if(n&&n.tagName.toUpperCase()=="A"){for(t._saveContent(),i=n.firstChild;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n);i&&Sys.Extended.UI.HtmlEditor._setCursor(i,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);