Hello Kevin Pipher,
You can disable the custom dialogs by modifying template where the RadEditor is declared. You have to remove the lines below from the template and the control will start using its embedded designer
Telerik.Web.UI.Editor.CommandList["LinkManager"] = function(commandName, editor, args) {
var editorArgs = editor.getSelectedElement();
if (!editorArgs.nodeName || typeof (editorArgs.nodeName) == "undefined" || editorArgs.nodeName != "A") {
var sel = editor.getSelection();
editorArgs = sel;
editorArgs.Html = sel.getHtml();
editorArgs.Text = sel.getText();
}
var myCallbackFunction = function(sender, args) {
if (typeof (editorArgs.nodeName) != "undefined" && editorArgs.nodeName == "A")
args.parentNode.replaceChild(editorArgs, args);
else {
var cloned = args.cloneNode(true);
var div = args.ownerDocument.createElement("DIV");
div.appendChild(cloned);
editorArgs.pasteHtml(div.innerHTML);
}
}
var path = '<%= ((Telerik.Cms.Web.CmsPageBase)Page).ResolveCmsUrl("~/Sitefinity/UserControls/Dialogs/LinksDialog.aspx") %>';
editor.showExternalDialog(
path,
editorArgs,
750,
515,
myCallbackFunction,
null,
'ImageLibraryDialog',
false,
Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
false,
true)
};
Telerik.Web.UI.Editor.CommandList["SetLinkProperties"] = function(commandName, editor, args) {
var editorArgs = editor.getSelectedElement();
if (!editorArgs.nodeName || typeof (editorArgs.nodeName) == "undefined" || editorArgs.nodeName != "A")
editorArgs = editor.getSelection();
var myCallbackFunction = function(sender, args) {
if (typeof (editorArgs.nodeName) != "undefined" && editorArgs.nodeName == "A")
args.parentNode.replaceChild(editorArgs, args);
else {
var cloned = args.cloneNode(true);
var div = args.ownerDocument.createElement("DIV");
div.appendChild(cloned);
editorArgs.pasteHtml(div.innerHTML);
}
}
var path = '<%= ((Telerik.Cms.Web.CmsPageBase)Page).ResolveCmsUrl("~/Sitefinity/UserControls/Dialogs/LinksDialog.aspx") %>';
editor.showExternalDialog(
path,
editorArgs,
750,
515,
myCallbackFunction,
null,
'ImageLibraryDialog',
false,
Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
false,
true)
};
Another option would be to extend the custom dialog and implement support for anchor. You have to modify Sitefinity\Admin\ControlTemplates\Pages\Dialogs\LinksEditorDialog.ascx. You have to add a TextBox control that will be used to set the anchor name and then insert the name in the HTML when the data is submitted - insertLink() js function is called.
below is a sample code
You should have the lines below in the template
All the best,
Ivan Dimitrov
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items.