This is a migrated thread and some comments may be shown as answers.

[Solved] Missing custom tools images on postback

2 Answers 90 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 17 Aug 2009, 10:24 PM
I'd appreciate some help with this:

I have a working Rad Editor in which I have three custom tools.  All three tools work correctly, and the images that display on the three buttons show up properly on page_load.  However, when there is a post back, I lose the three images.  The click of any of the three buttons still has the desired result, though.

Here is the code:

<telerik:EditorToolGroup> 
     <telerik:EditorTool Name="Arrow" ShortCut="Shift+Alt+r"/> 
     <telerik:EditorTool Name="Yen"/>
     <telerik:EditorTool Name="Euro"/>
</telerik:EditorToolGroup>

<style type="text/css"
    .Arrow 
        { 
        background-image: url("../img/rt_icon2.gif")!important; 
        } 
    .Yen 
        { 
        background-image: url("../img/yen2.jpg")!important; 
        } 
    .Euro 
        { 
        background-image: url("../img/euro.jpg")!important; 
        } 
</style> 

<script type="text/javascript"
 
 
    Telerik.Web.UI.Editor.CommandList["Arrow"] = function(commandName, editor, args)  
    { 
        editor.pasteHtml("<font style='FONT-SIZE: 11pt; FONT-STYLE: normal; FONT-FAMILY: wingdings'>è</font>"); 
    }; 
    Telerik.Web.UI.Editor.CommandList["Yen"] = function(commandName, editor, args)  
    { 
        editor.pasteHtml("<font style='FONT-SIZE: 11pt; FONT-STYLE: normal; FONT-FAMILY: arial'>Â¥</font>"); 
    }; 
    Telerik.Web.UI.Editor.CommandList["Euro"] = function(commandName, editor, args)  
    { 
        editor.pasteHtml("<font style='FONT-SIZE: 11pt; FONT-STYLE: normal; FONT-FAMILY: arial'>€</font>"); 
    }; 
 
</script> 

Thanks in advance for your help in determining how to avoid losing my images!

Michael

2 Answers, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 20 Aug 2009, 08:51 AM
Hi Michael,

You should not experience this problem. I tried to reproduce it with version 2009.1 402 but without success. For your convenience I have attached video demonstrating my test and my project. Are you able to reproduce the issue by deploying and testing the project?

You should also see the logs in Fiddler for errors and check why the icons are not loaded after the postback on your end.

Kind regards,
Rumen
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.
0
Michael
Top achievements
Rank 1
answered on 03 Nov 2009, 09:13 PM
Thank you for this answer and your video.  The problem was that the Javascript with the image URL's wasn't inside the head tags in my master page, but was instead sitting in the control page that is inserted into an aspx page within content tags.

Once I moved the URL's over and rebuilt the sln, the images showed up after postback.

Thanks!
Tags
Editor
Asked by
Michael
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Michael
Top achievements
Rank 1
Share this question
or