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

Custom Buttons

2 Answers 70 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Velma
Top achievements
Rank 1
Velma asked on 07 Jul 2011, 10:32 PM

I added three custom buttons to my RadEditor.

---------------------------------

Added the following to my xml file:

 

<tools name="CustomToolbar" dockable="true" enabled="true">

    <tool name="DatabaseSave" />

    <tool name="Open-Print" />

    <tool name="Email" />

</tools>


Added the following to my markup:
<style type="text/css">

    .reTool .DatabaseSave

    

        background-image: url(save.gif);

    }

    .reTool .Open-Print 

    {

        background-image: url(printer.ico);

    }

    .reTool .Email

    

        background-image: url(email.gif);

    }

</style>

  

<telerik:RadEditor ID="RadEditor1" Runat="server" 

ToolsFile="~/Letters/DocMaster/ToolsFile.xml" EditModes="Design" AutoResizeHeight="True" 

ClientIDMode="Inherit" Skin="Hay" Width="100%" />

  

<script type="text/javascript">

    Telerik.Web.UI.Editor.CommandList["Save"] = function (commandName, editor, args) {

        alert("Pressed Save");

    };

  

    Telerik.Web.UI.Editor.CommandList["Open-Print"] = function (commandName, editor, args) {

        alert("Pressed Open-Print");

    };

  

    Telerik.Web.UI.Editor.CommandList["Email"] = function (commandName, editor, args) {

        alert("Pressed Email");

    };

</script>

---------------------------------

The buttons showed with their default glippy no problem. The button press function calls came up no problem. I played with everything I could think of to get the background-image little graphics to show on the buttons using every path methodology I knew or could think of, including internal and external CSS. In my test project, I finally got them to show only by putting the graphics in the same folder as the page that holds the RadEditor. So I incorporated it into the real project. In the real project, the RadEditor is on a nested master page. Nothing I can do nohow will get those buttons to show, no matter where I put them or how I write those paths. Please help.

Thanks.

2 Answers, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 08 Jul 2011, 11:26 AM
Hello Velma,

Could you please open a support ticket and send a simple working project that demonstrates the issue? I will examine it and provide a solution. The problem is most likely due to incorrect Image url paths.

Best regards,
Rumen
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Velma
Top achievements
Rank 1
answered on 19 Jul 2011, 11:15 PM
Thank you. As so often happens, when I made the little demo project for you, I found my bug. Just had some code in the wrong place...
Tags
Editor
Asked by
Velma
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Velma
Top achievements
Rank 1
Share this question
or