Removing forecolour of backcolour from selection

2 posts, 0 answers
  1. Datamex
    Datamex avatar
    161 posts
    Member since:
    Jun 2012

    Posted 19 Aug 2009 Link to this post


    I have multiple RadEditors in the CMS of a webshop, with which it is possible to change different texts on the webshop. I added the tools for changing the fore- and backcolour of the text. This works as expected, except when you want to remove the colouring (and go back to the default colour, as specified in the css file). The colour controls have an "empty" colour in their top left, which shows as black on white in the two bars below the colourpicker. But somehow the text itself does not change colour. This problem also exists in the demo.

    Any help is appreciated.
  2. Rumen
    Rumen avatar
    12788 posts

    Posted 24 Aug 2009 Link to this post

    Hi Datamex,

    I was able to reproduce this problem in Firefox only.

    Please, try the following code that will solve the issue in Firefox:

    <script type="text/javascript">   
    function OnClientCommandExecuted(editor, args)   
       if (!args || !args.get_commandName) return;                             
       var command = args.get_commandName();  
       var value = args.get_value();  
       if (command == "ForeColor" || command == "BackColor")  
           if ($telerik.isIE) return
           if (value.trim() == "")  
   "FormatStripper", {value : "SPAN"});   
       OnClientCommandExecuted="OnClientCommandExecuted" >   
       <Content> sample content </Content>   

    Best wishes,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft R3 2016 release webinar banner
Back to Top