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

[Solved] Appending Custom Dialog Button(s) to toolbar

3 Answers 95 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Dana
Top achievements
Rank 1
Dana asked on 14 Sep 2009, 10:08 AM
I added a custom dialog to the editor's toolbar and managed to get it working as per your sample at: http://demos.telerik.com/aspnet-ajax/editor/examples/customdialogs/defaultcs.aspx.

However, the editor's default toolbar has disappeared! Is there a way to append my custom button to the original toolbar rather than replacing it?

Regards

Dana

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 14 Sep 2009, 12:30 PM
Hi Dana,

Using the following syntax you will be able to add custom buttons without hiding the default ones:

        RadEditor1.EnsureToolsFileLoaded();
        Telerik.Web.UI.EditorTool custom1 = new Telerik.Web.UI.EditorTool();
        custom1.Name = "Custom1";
        custom1.ShortCut = "CTRL+1";
        RadEditor1.Tools[0].Tools.Add(custom1);

Another way to add a custom button is via the ToolsFile.xml file.

More information can be found here: http://www.telerik.com/help/aspnet-ajax/addingyourownbuttons.html

Greetings,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Dana
Top achievements
Rank 1
answered on 15 Sep 2009, 08:12 AM
Great, that did the job.

One more question if possible, it there a way that let us put the custom button on any particular area of the toolbar? i.e, can I put it next to the 'insert link' commands on the toolbar for example.



Regards

Dana
0
Rumen
Telerik team
answered on 16 Sep 2009, 09:04 AM
Hi Dana,

You should use the following syntax to insert a new tool at desired position:

RadEditor1.Tools[0].Tools.Insert(2,custom1);

Sincerely yours,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Editor
Asked by
Dana
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Dana
Top achievements
Rank 1
Share this question
or