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

Forums / Bugs & Issues / RadEditor's Insert Image/Document icons missing

RadEditor's Insert Image/Document icons missing

9 posts, 0 answered
  1. Victor
    Victor avatar
    44 posts
    Registered:
    10 Mar 2009
    07 Jul 2009
    Link to this post
    I am using a RadEditor in in my control and I have no idea how to make "Insert Image" and "Insert document" buttons to show the correct icons, they work but they show a little "i" icon.

    I copied all the javascript, heck, I even copied verbatim the complete definition of the RadEditor used by the Generic Content editor in Sitefinity\Admin\ControlTemplates\Generic_Content\GenericContentDesigner.ascx to not avail.

    Help?

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    07 Jul 2009
    Link to this post
    Hi Victor,

    Could you send us a screenshot of the RadEditor you see? The dialogs you are referring are visible and set by default. I am not able to reproduce any problems working with the last official release 3.6  build 1936( as well with all builds from 3.5 SP1)

    All the best,
    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. Victor
    Victor avatar
    44 posts
    Registered:
    10 Mar 2009
    07 Jul 2009
    Link to this post
    I don't know how to attach screenshots to this thing but you can see it in action at:

    http://www.nase.org/about/feedback.aspx

  4. Victor
    Victor avatar
    44 posts
    Registered:
    10 Mar 2009
    07 Jul 2009
    Link to this post
    Ivan, we updated that form so here is a link to screenshot:

    http://test.nase.org/files/editor_icons_wtf.png

  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    08 Jul 2009
    Link to this post
    Hello Victor,

    The first time I checked the link the buttons were visible, but now there are removed. However, I encounterd the js alert saying that LibraryDocument( Image) manager was not defined.

    This problem is due to different way to call the template that contains the WebEditor.

    To fix this please use the following js.

                Telerik.Web.UI.Editor.CommandList["LibraryImageManager"] = 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 == "IMG"
                            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/ImageEditorDialog.aspx") %>'
                                   editorArgs, 
                                   750, 
                                   600, 
                                   myCallbackFunction, 
                                   null
                                   'ImageLibraryDialog'
                                   true
                                   Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move, 
                                   false
                                   true
                }; 
     
                Telerik.Web.UI.Editor.CommandList["LibraryDocumentManager"] = 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/DocumentEditorDialog.aspx") %>'
                                   editorArgs, 
                                   750, 
                                   600, 
                                   myCallbackFunction, 
                                   null
                                   'ImageLibraryDialog'
                                   false
                                   Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move, 
                                   false
                                   true
                }; 


    The major issue with the styling can be fixed after setting the classes below:

    .LibraryImageManager 
     background-position: -366px center
    .LibraryDocumentManager 
     background-position: -185px center


    All the best,
    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.
  6. Victor
    Victor avatar
    44 posts
    Registered:
    10 Mar 2009
    09 Jul 2009
    Link to this post
    Setting them styles fixed it, thanks!

  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    09 Jul 2009
    Link to this post
    Hi Victor,

    I am glad to hear that everything is working now.

    Greetings,
    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.
  8. Rajender
    Rajender avatar
    1 posts
    Registered:
    29 Dec 2011
    29 Dec 2011
    Link to this post
    hi i have a same issue... i am viewing the document with images in rad editor everything is working fine in firefox the issue is with IE. images are unable to open in IE. and in above code i am not able to understand which page u are redirecting
    /Sitefinity/UserControls/Dialogs/ImageEditorDialog.aspx

    please, provide some help regarding this issue
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    30 Dec 2011
    Link to this post
    Hi,

    Which version of Sitefinity you use? This post is for Sitefinity 3.5/3.6 released 2 years ago. Can you replicate the issue with Sitefinity 3.7 SP4 and if so please provide some more description and screenshots about the issue you have.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested 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
9 posts, 0 answered