Color Picker Change/Add Default Color

6 posts, 0 answers
  1. MarcoFischboeck
    MarcoFischboeck avatar
    6 posts
    Member since:
    Jul 2007

    Posted 24 Sep 2007 Link to this post

    Hello,

    i need some help. 
    I am using the RadEditor for SharePoint in a WCM Cenario, the Version is 4.3.1.0.

    I need to add some special Company-Specific-colors into the color picker (The small window you can change the background or font color). 

    Can anybody help me?

    Thx Marco


  2. Rumen
    Admin
    Rumen avatar
    12849 posts

    Posted 24 Sep 2007 Link to this post

    Hello Marco,

    You can control the contents of the Color dropdowns by modifying the editor's ToolsFile.xml, which is located in the following folder:

    /Program Files/Common Files/Microsoft Shared/web server extensions/wpresources/RadEditorSharePoint/4.3.1.0__1f131a624888eeed/RadControls/Editor/

    Add a <colors> node inside the <root> node, but outside the <tools> node. List all colors you want to use.

    <colors>
      
    <color value="#FF00EE" />
      
    <color value="#840012" />
      
    <color value="#0000AA" />
      
    <color value="#95AA34" />
    </
    colors>

    This will populate the ForeColor and BackColor dropdowns with your new color items.

    Kind regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

  3. MarcoFischboeck
    MarcoFischboeck avatar
    6 posts
    Member since:
    Jul 2007

    Posted 27 Sep 2007 Link to this post

    Thank you! It helped me.
  4. Marja
    Marja avatar
    15 posts
    Member since:
    Jul 2008

    Posted 12 Jan 2009 Link to this post

    Dear All,

    I have a customer who's company colors have specific names.
    I've managed to get the colors to show correctly, but the names are showing the hex value of the color instead of the title.

    My code is:
    </tools>
    <colors>
        <color Title="Cool" Value="#0190a1" />
    </colors>
    Kind Regards,
    Marja
  5. Rumen
    Admin
    Rumen avatar
    12849 posts

    Posted 12 Jan 2009 Link to this post

    Hi Marja,

    To ensure fast loading, the RadEditor has been optimized in all possible ways and respects. One of the choices made when dealing with colors is to send just the values to reduce the array size by half (logic being that users will pick up a color on the basis of what they see rather than based on its name).

    So, my suggestion would be to simply use the following syntax:

    <colors>
        <color Value="LightBlue" />
    </colors>

    If this is not a good enough solution for your scenario, you can use the attached sample page, which demonstrates how to override some methods of the color picker tool of the editor to allow for changing the string that appears in the color tooltips.

    Greetings,
    Rumen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Marja
    Marja avatar
    15 posts
    Member since:
    Jul 2008

    Posted 16 Jan 2009 Link to this post

    Thanks, that solved my problem!

    regards,
    Marja
Back to Top