+1-888-365-2779
Try Now
More in this section

Forums / Suggestions / Bring back anchor editing/inserting

Bring back anchor editing/inserting

10 posts, 0 answered
  1. Kevin Pipher
    Kevin Pipher avatar
    91 posts
    Registered:
    30 Nov 2005
    18 Dec 2008
    Link to this post
    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.
  2. Georgi
    Georgi avatar
    3583 posts
    Registered:
    20 Sep 2016
    20 Dec 2008
    Link to this post
    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.
  3. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    17 Feb 2009
    Link to this post
    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
  4. Meister
    Meister avatar
    262 posts
    Registered:
    09 Nov 2007
    19 Feb 2009
    Link to this post
    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
  5. Georgi
    Georgi avatar
    3583 posts
    Registered:
    20 Sep 2016
    20 Feb 2009
    Link to this post
    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.
  6. yuval
    yuval avatar
    11 posts
    Registered:
    23 Jun 2008
    04 Mar 2009
    Link to this post
    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
  7. Georgi
    Georgi avatar
    3583 posts
    Registered:
    20 Sep 2016
    05 Mar 2009
    Link to this post
    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.
  8. Omnia Development
    Omnia Development avatar
    4 posts
    Registered:
    29 Jan 2007
    30 Jun 2009
    Link to this post
    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.
  9. Kevin Pipher
    Kevin Pipher avatar
    91 posts
    Registered:
    30 Nov 2005
    08 Jun 2010
    Link to this post
    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?

  10. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    09 Jun 2010
    Link to this post
    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.
Register for webinar
10 posts, 0 answered