Cannot display ImageUrl

2 posts, 1 answers
  1. Karl Mikesell
    Karl Mikesell avatar
    55 posts
    Member since:
    May 2010

    Posted 30 Aug 2011 Link to this post

    Unable to set Image of content menu item, will display first image of sprite (WebResource.png)

    Using:
    <%@ Register Tagprefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2011.2.712.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>

    <telerik:RadEditor ID="_radEditor" runat="server" ...
                        <ContextMenus>
                            <telerik:EditorContextMenu TagName="FONT">
                                <telerik:EditorTool Name="MyCustomAction" Text="Properties" ImageUrl="~/images/siteIcon.png" />
                            </telerik:EditorContextMenu>
                            <telerik:EditorContextMenu TagName="SPAN">
                                <telerik:EditorTool Name="MyCustomAction" Text="Properties" ShowIcon="false" />
                            </telerik:EditorContextMenu>
                        </ContextMenus>
  2. Answer
    Rumen
    Admin
    Rumen avatar
    13748 posts

    Posted 30 Aug 2011 Link to this post

    Hi Karl Mikesell,

    The imageUrl property is not supported by RadEditor for ASP.NET AJAX, which has new toolbar architecture based on image sprites. Using a new client-side model, semantic rendering, and many other innovations such as the use of css image sprites, the new RadEditor delivers minimal and well-formed output. Its new rendering and architecture allows it to be a couple of times faster than the classic ASP.NET Editor.

    The only supported way to set an image to a custom tool is to provide image file for it and output the following CSS class in the page with the editor:

    <style type="text/css">
    .reTool .MyCustomAction
    {
    background-image: url(MyImage.gif);
    }
    </style>

    as shown in this article: Adding Your Own Buttons.

    Best wishes,
    Rumen
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Back to Top