Duplicating the look+feel of the backcolor dropdown

2 posts, 0 answers
  1. Kjell
    Kjell avatar
    283 posts
    Member since:
    Jun 2010

    Posted 05 Sep 2013 Link to this post

    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:

    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.

  2. Ianko
    Ianko avatar
    1940 posts

    Posted 10 Sep 2013 Link to this post

    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.

    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.
Back to Top