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

custom contextmenu icon

1 Answer 73 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Michael Pullella
Top achievements
Rank 1
Michael Pullella asked on 01 Apr 2010, 05:22 PM
Hi

I would like to specify an icon for my custom context menu in my radEditor. 

I am able to display an icon for my toolbar as in the following:
<root> 
 
    <tools name="MainToolbar">  
        <tool name="tbiComment" showtext="true" Text="Mark as Comment" shortcut="CTRL+SHIFT+C"/>  
     

This works for my toolbar.
        .reToolbar.Default .tbiComment {  
           background-imageurl(../images/comment.png);  
        }  
 

I have a custom contextmenu:
    <contextMenus> 
        <contextMenu forElement="comment">  
            <tool name="tbiEditComment" Text="Edit Comment" /> 
            <tool name="tbiRemoveComment" Text="Remove Comment" /> 
        </contextMenu> 

Just need the css to display a custom icon for my contextmenus. 

Thanks in advance... You guys Rock!

1 Answer, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 02 Apr 2010, 01:05 PM
Hi Michael,

You can add context menu icons by adding the following two css classes on the page with RadEditor:

<style type="text/css">
.tbiEditComment
        {
            background-image: url(http://demos.telerik.com/aspnet-ajax/editor/examples/customtools/Icons/Custom.gif) !important;  
        }
        
        .tbiRemoveComment
        {
            background-image: url(http://demos.telerik.com/aspnet-ajax/editor/examples/customtools/Icons/Cancel.gif) !important;  
        }
</style>

They represent the names of the context menu items:

<contextMenu forElement="comment">
      <tool name="tbiEditComment" Text="Edit Comment" />
      <tool name="tbiRemoveComment" Text="Remove Comment" />
</contextMenu>

Best regards,
Rumen
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Editor
Asked by
Michael Pullella
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or