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

Duplicating the look+feel of the backcolor dropdown

1 Answer 21 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Kjell
Top achievements
Rank 1
Kjell asked on 05 Sep 2013, 11:53 PM
I would like to add a dropdown to my radEditor toolbar which looks exactly like the "BackColor" EditorSplitButton.  It will set the background color for all the content rather than just selected text.

This article gives me a good idea on how to add the dropdown:
http://demos.telerik.com/aspnet-ajax/editor/examples/customdropdowns/defaultcs.aspx

And I believe I can set the background like this:

var style = editor.get_contentArea().style;
var val = args.get_value();

style.backgroundImage = "none";

style.backgroundColor = val;


The above is all working great, all I need is the markup to make the custom EditorSplitButton look just like the BackColor one.  I still need the default BackColor dropdown as well so I don't want to just overwrite the functionality for that command.


1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 10 Sep 2013, 03:33 PM
Hello Kjell,

To create a tool that looks similarly to the BackColor tool, you could use a custom ToolStrip.

The HTML markup could be investigated with the browser's dev toolbar and modified with CSS or JavaScript. For example, the ToolStrip is an UL element with nested LI and A elements.

Regards,
Ianko
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Editor
Asked by
Kjell
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or