More in this section

Forums / Developing with Sitefinity / Am I Missing Something ????

Am I Missing Something ????

4 posts, 0 answered
  1. Squid
    Squid avatar
    6 posts
    Registered:
    05 Dec 2005
    15 Apr 2009
    Link to this post
    We have just finished our first Sitefinity deployment and are comparing the feature-set to other CMS toolsets we have deployed in the past.

    One thing that jumped out at us was the lack of controls provided to an end user when inserting a link.

    To be more specific, if we were to highlight text in the WYSIWYG editor of a Generic Content module and then select the LINK option from the toolbar...the only options we have are the LINK ADDRESS and ALT TEXT.

    Where are other basic options such as: TARGET, CLASS, etc.

    We have also noted that evene when we add our link classes to apply class dropdown, the tool adds a SPAN WITH THE CLASS around the <a> tag instead of putting the class inside the <a> tag.  This only effects the font and size and does not properly assign the color for the text inside the <a> tag.

    I know I can open up the HTML editor and add them by hand, but that defeats the purpose of allowing non-programmers to update and manage content.

    Thanks for your assistance with this.

    Sid
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    16 Apr 2009
    Link to this post
    Hello Squid,

    We use a customized dialogs for RadEditor control and we have replaced LinkManager with a custom one. You can disable our LinkManager and use the default one by commenting the script below from desired templates.

    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); 
                                        } 
                                   } 
                                   editor.showExternalDialog( 
                                   '<%= Page.ResolveUrl("~/Sitefinity/UserControls/Dialogs/LinksDialog.aspx") %>'
                                   editorArgs,  
                                   750,  
                                   600,  
                                   myCallbackFunction,  
                                   null,  
                                   'ImageLibraryDialog',  
                                   false,  
                                   Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,  
                                   false,  
                                   false
                                }; 
                                 
                                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); 
                                        } 
                                   } 
                                   editor.showExternalDialog( 
                                   '<%= Page.ResolveUrl("~/Sitefinity/UserControls/Dialogs/LinksDialog.aspx") %>'
                                   editorArgs,  
                                   750,  
                                   600,  
                                   myCallbackFunction,  
                                   null,  
                                   'ImageLibraryDialog',  
                                   false,  
                                   Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,  
                                   false,  
                                   false
                                }; 

    As for the second problem you have, we managed to reproduce it only in FireFox browser, when the begging of the content area is used. I am sending you a video that demonstrates this behavior. Also, it occurs randomly. However, we have logged this issue for further investigation and it will be fixed.

    Best wishes,
    Ivan Dimitrov
    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.
  3. Squid
    Squid avatar
    6 posts
    Registered:
    05 Dec 2005
    16 Apr 2009
    Link to this post
    Hi Ivan -

    Thanks for the quick reply. 

    We tested your suggestion and found that it works just as you said.  However when reverting back to the RADTOOLS version you lose the ease of linking to internal sitefinity pages and documents. 

    While you could try and look up the document or page URL and then add it to the appropriate field, you lose the ability of clicking and selecting a page or file as you can in the SiteFinity version.  Is there any way to merge the two to get the best of both worlds?

    I'm concerned that my client's non-programmers (content managers) will find it difficult to create internal links.

    Thanks,

    Sid
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    17 Apr 2009
    Link to this post
    Hello Squid,

    There is a way to have the option to select from Sitefinity SiteMap, but it require implementing a custom designer that has both options and uses default LinkManager. I am sending you a file with the code of default LinkManager from where you can gather information about how it works and create your custom designer.

    Kind regards,
    Ivan Dimitrov
    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.
Register for webinar
4 posts, 0 answered