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

Cannot display ImageUrl

1 Answer 91 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Karl Mikesell
Top achievements
Rank 1
Karl Mikesell asked on 30 Aug 2011, 03:54 PM
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>

1 Answer, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 30 Aug 2011, 04:01 PM
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 >>

Tags
Editor
Asked by
Karl Mikesell
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or