RadHtmlField default font in edit mode

7 posts, 0 answers
  1. Matthieu
    Matthieu avatar
    3 posts
    Member since:
    Aug 2008

    Posted 27 Aug 2008 Link to this post

    Hello,

    I'm using the RadHtmlField for a project with MOSS 2007, and the default selected font in edit mode is the default font of the web browser. I need to have this default font set to "verdana", regardless to the browser's default font.
    I've searched for online help for hours without finding anything helpful. Does anyone knows how to do it or has any advice ?

    Thanks for your help.
    Matthieu.
  2. George
    Admin
    George avatar
    859 posts

    Posted 27 Aug 2008 Link to this post

    Hi Matthieu,

    Please review the following help article that demonstrates how to define custom CSS styles to the editor's content area:
    http://www.telerik.com/help/moss/editor/defining%20custom%20css%20styles.html

    Next, open the CssEditor.css and set the desired font default font e.g.
    body

        font-family: Verdana !important;
        font-size: 10px !important
    ;
    }

    I hope this helps.

    Sincerely, George
    the Telerik team


    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

  3. Matthieu
    Matthieu avatar
    3 posts
    Member since:
    Aug 2008

    Posted 27 Aug 2008 Link to this post

    Hi George,

    I've read the article you gave me a link and tested the solution given there. I've located the /Program Files/Common Files/Microsoft Shared/web server extensions/wpresources/RadEditorSharePoint/5.0.1.0__1f131a624888eeed/ folder and created the directory RadControls/Editor that didn't exist. Then I've created a file CssEditor.css like you advised me but nothing changed in my editor. Is there a property to set on the RadHtmlField in my MOSS page layout ?

    I precise that my text is well displayed in non-edit mode, applying the css styles defined for the MOSS site (with verdana font). It's just when I pass in edit-mode, I want the font selection dropdown list to be set by default on verdana.

    Thanks,
    Matthieu.
  4. George
    Admin
    George avatar
    859 posts

    Posted 29 Aug 2008 Link to this post

    Hi Matthieu,

    Excuse me for the omission - the provided solution was for the 4.x version of the control - ASP.NET. Please review the following article that describes how to achieve the desired behavior using the 5.x (ASP.NET AJAX) one:
    http://www.telerik.com/help/aspnet-ajax/defining-custom-css-styles.html

    I hope this helps.

    Sincerely, George
    the Telerik team


    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Matthieu
    Matthieu avatar
    3 posts
    Member since:
    Aug 2008

    Posted 29 Aug 2008 Link to this post

    Hi George,

    Don't worry for the omission, I should have given the version of our RadHtmlField in my first post.
    Your solution did exactly what I want, thank you so much !

    Sincerly,
    Matthieu.
  6. Francois
    Francois avatar
    1 posts
    Member since:
    Nov 2012

    Posted 21 Jan 2013 Link to this post

    Hi.

    I know this is an old thread, but I am having this problem still.

    I am using version RadHtmlEdit for Sharepoint 6.5.1.0 and I swear this no documentation on the planet about this.

    Its the same thing, quite simply, I need the editor to go to a default font "Calibri"


    How on earth?
  7. Rumen
    Admin
    Rumen avatar
    12846 posts

    Posted 22 Jan 2013 Link to this post

    Hello,

    If you want to define a default font size for the content area of RadEditor for SharePoint 2010, create a css file named CssEditor.css file in the \Program Files\Common Files\Microsoft Shared\Web Server Extensions\wpresources\RadEditorSharePoint\6.x.x.0__1f131a624888eeed\Resources folder and put the following class in it:

    .reContentArea /*this selector corresponds to the body selector when RadEditor is in Iframe mode*/
    {
       font-size: 12px !important;
       font-family: Calibri !important;
    }

    The solution is based on the following live demo for regular RadEditor for ASP.NET AJAX: Setting Content Area Defaults for DIV content area.

    For your convenience I have attached a video demonstrating my test: http://screencast.com/t/FNUENIcg.

    Greetings,
    Rumen
    the Telerik team
    Learn how the Telerik controls can be integrated in SharePoint 2007/2010 from this resource. To watch them in action, explore our online SharePoint 2010 and SharePoint 2007 demo sites.
Back to Top