asp.nettelerikradeditor

How do I set the default font on Telerik's RadEditor?


There must be an easy way to set the default selected font of the Font Name dropdown list. I've been looking around on the Telerik site and forums but I can't find a simple way. Maybe there is no simple way, but maybe I just can't find it.

Here is my RadEditor:

      <telerik:RadEditor ID="RadEditor1" runat="server" ContentFilters="MakeUrlsAbsolute,ConvertToXhtml,RemoveScripts"
                    EditModes="All" EnableResize="false" Font-Bold="false" Font-Names="Arial" Font-Size="8pt"
                    Height="230px" MaxHtmlLength="3000" MaxTextLength="3000" NewLineMode="Br" Skin="Web20">
                    <Tools>
                        <telerik:EditorToolGroup>
                            <telerik:EditorTool Name="ImageManager" />
                            <telerik:EditorSeparator />
                            <telerik:EditorTool Enabled="true" Name="FontName" />
                            <telerik:EditorTool Enabled="true" Name="FontSize" />
                            <telerik:EditorSeparator />
                            <telerik:EditorTool Enabled="true" Name="BackColor" />
                            <telerik:EditorTool Enabled="true" Name="ForeColor" />
                            <telerik:EditorTool Enabled="true" Name="Bold" />
                            <telerik:EditorTool Enabled="true" Name="Italic" />
                            <telerik:EditorTool Enabled="true" Name="Underline" />
                            <telerik:EditorSeparator />
                            <telerik:EditorTool Enabled="true" Name="Copy" />
                            <telerik:EditorTool Enabled="true" Name="Cut" />
                            <telerik:EditorTool Enabled="true" Name="Paste" />
                            <telerik:EditorTool Enabled="true" Name="AjaxSpellCheck" Text="Spell Check" />
                        </telerik:EditorToolGroup>
                    </Tools>
                    <ImageManager MaxUploadFileSize="1048576" SearchPatterns="*.jpg,*.jpeg,*.png,*.gif,*.bmp, *.ico"
                        UploadPaths="~/images/" ViewPaths="~/images/" />
                </telerik:RadEditor>

I hope one of you out there can tell me! Thanks!


Solution

  • This worked:

    The editor:

     <telerik:RadEditor ID="myEditor" OnClientLoad="RadEditorLoad" runat="server" ... >
    

    Handler:

            function RadEditorLoad(editor, eventArgs) {
    
                // Set the Editor Default Font to Arial
    
                 editor.get_contentArea().style.fontFamily = 'Arial'
            }
    

    Found this at: http://www.telerik.com/community/forums/aspnet-ajax/editor/radeditor-setting-font.aspx