Forums

Skip Navigation LinksHome / Developer Network / Forums / Sitefinity Older Versions (3.x): Suggestions > Bring back anchor editing/inserting

Bring back anchor editing/inserting

  • Kevin Pipher avatar

    Posted on Dec 18, 2008 (permalink)

    Hi,

    I'd like to strongly suggest that anchor editing/inserting functionality be reintroduced into the latest "insert a link" tool within generic content.

    In pre v3.2, the Link Manager control allowed users to easily add and link to anchors on the page.  With the latest few versions of sitefinity, the new link tool no longer has this feature. I know the two current workarounds are:

    1. Revert the tool back to the old Link manager, or;
    2. Have the users modify the html markup within the generic content editor to add that <a name="myAnchor" /> tag, etc.

    Neither of these are acceptable because:

    1. CMS end users aren't familiar with html so manual editing is not an option. If sitefinity is designed for non-IT staff, this is not a realistic expectation.
    2. Upgrading versions should not remove functionality available in prior versions. If an upgrade changes features but doesn't remove functionality, this is fine, but removing functionality from one production version to the next is not ok.
    3. The new link editor tool solves the problem of being able to link to other CMS pages very easily, which is needed and a great feature. Scaling back to the old link manager means a loss of this feature.

    I hope to see anchor adding/editing in 3.6. Thanks for the consideration.

    Kevin.

    Reply

  • Georgi Georgi admin's avatar

    Posted on Dec 20, 2008 (permalink)

    Hi Kevin Pipher,

    I regret to inform you that the anchoring option will not be available in Sitefinity 3.6.
    We plan to remake all dialog managers in Sitefinity. Most probably they will changed with Sitefinity 4.0. Other than that, I completely agree with you!

    Best wishes,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

    Reply

  • Posted on Feb 17, 2009 (permalink)

    Maybe then it would also be nice to add a dropdownlist with options for the anchor 'target' property. If I create a link inside my text to another website, I alway have to switch to HTML code to add this target='_blank' property.

    This is always a minor when I demonstrate the Sitefinity Admin Area to customers...

    Daniel

    Reply

  • Meister Intermediate avatar

    Posted on Feb 19, 2009 (permalink)

    i agree with daniel on this one
    if we could get it in a service pack/hot fix for 3.6 that would be great

    Reply

  • Georgi Georgi admin's avatar

    Posted on Feb 20, 2009 (permalink)

    Hi Quade,

    I can understand how you feel when you show this part of the backend. We have raised the priority of this task.

    Best wishes,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.

    Reply

  • yuval avatar

    Posted on Mar 4, 2009 (permalink)

    Hello,

    Are there any updates about a hotfix or something about the insertion of anchors through the insert link dialog? version 3.6
    really needed...

    thanks,
    yuval

    Reply

  • Georgi Georgi admin's avatar

    Posted on Mar 5, 2009 (permalink)

    Hi,

    The hyperlink manager dialog is actually a user control (in a page used by the editor). The user control itself is [YourProject]\Sitefinity\Admin\ControlTemplates\Pages\Dialogs\LinksEditorDialog.ascx. It is not an embedded one, so you do not need to touch the ControlsConfig file for that.
    We will try to add this functionality out of the box in the next service pack, since it is very popular demand.

    Kind regards,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.

    Reply

  • Nauman avatar

    Posted on Jun 30, 2009 (permalink)

    I needed the same thing but we used rel instead of the target attribute, it works by modifying the User control, here's how.

    Add the following at line 100 after closeArgument.href = urlTxt.value;
    closeArgument.rel = targetTxt.value;

    Then add the following @ line 168 after </li> for tooltip

    <li>
                <asp:Label ID="Label4" runat="server" Text="Target Window" AssociatedControlID="targetTextBox"></asp:Label>
                <asp:TextBox runat="server" ID="targetTextBox"></asp:TextBox>         
                <p class="example"><asp:Literal ID="Literal3" runat="server" Text="Set the target window to open the link. external or internal" ></asp:Literal></p>
            </li>

    That's it, hope it helps someone.

    Reply

  • Kevin Pipher avatar

    Posted on Jun 8, 2010 (permalink)

    Hi, just checking in on this issue. Is anchor editing being reintroduced at any time in the future? Our users are very frustrated with having to switch to html mode to 'hack' them in rather than using the dialog.

    Is there a way to introduce the old links editor dialog back into the Generic Content control side-by-side with the current links editor? At least that way they could click an icon for the old dialog when dealing with anchors?

    Reply

  • Ivan Dimitrov Ivan Dimitrov admin's avatar

    Posted on Jun 9, 2010 (permalink)

    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

    function insertLink() //fires when the Insert Link button is clicked
    {
        var closeArgument = currentElement;
        anchorText = document.getElementById('<%= AnchorText.ClientID %>');
      
       if (anchorText && anchorText.value != "")
           closeArgument.name = anchorText.value;
     
             ....
                       ....
     
    }

    You should have the lines below in the template

    <li>
               <asp:Label ID="Label8" runat="server" Text="AnchorText" AssociatedControlID="AnchorText"></asp:Label>
                  <p><asp:TextBox runat="server" ID="AnchorText" /></p>       
           </li>


    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.

    Reply

  • Register for webinar
Skip Navigation LinksHome / Developer Network / Forums / Sitefinity Older Versions (3.x): Suggestions > Bring back anchor editing/inserting