Forums

Skip Navigation LinksHome / Developer Network / Forums / Sitefinity Older Versions (3.x): Bugs & Issues > RadEditor's Insert Image/Document icons missing

RadEditor's Insert Image/Document icons missing

  • Victor avatar

    Posted on Jul 7, 2009 (permalink)

    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?

    Reply

  • Ivan Dimitrov Ivan Dimitrov admin's avatar

    Posted on Jul 7, 2009 (permalink)

    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.

    Reply

  • Victor avatar

    Posted on Jul 7, 2009 (permalink)

    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

    Reply

  • Victor avatar

    Posted on Jul 7, 2009 (permalink)

    Ivan, we updated that form so here is a link to screenshot:

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

    Reply

  • Ivan Dimitrov Ivan Dimitrov admin's avatar

    Posted on Jul 8, 2009 (permalink)

    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.

    Reply

  • Victor avatar

    Posted on Jul 9, 2009 (permalink)

    Setting them styles fixed it, thanks!

    Reply

  • Ivan Dimitrov Ivan Dimitrov admin's avatar

    Posted on Jul 9, 2009 (permalink)

    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.

    Reply

  • Rajender avatar

    Posted on Dec 29, 2011 (permalink)

    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

    Reply

  • Ivan Dimitrov Ivan Dimitrov admin's avatar

    Posted on Dec 30, 2011 (permalink)

    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

    Reply

  • Register for webinar
Skip Navigation LinksHome / Developer Network / Forums / Sitefinity Older Versions (3.x): Bugs & Issues > RadEditor's Insert Image/Document icons missing