This is a migrated thread and some comments may be shown as answers.

Set Font Size and Font Family to Text

3 Answers 169 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Rahul Khinvasara
Top achievements
Rank 1
Rahul Khinvasara asked on 17 Apr 2009, 12:13 PM
hi

i am using  Q1 version.  we are saving text with  the Font size and font family in to the  database in Html format.
when i show that text in Editor,  i want to set database Font size and font family  for that Text.. how do i replace editor Font size and font family with database Font size and font family.  please give me solutions ASAP.

Regards

Rahul



3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 20 Apr 2009, 02:13 PM
Hi Rahul,

I don't understand your scenario completely but you can apply the default font size and name to the content area by firing the editor's FontSize and FontName commands when the editor is loaded, e.g.

<script type="text/javascript">
function OnClientEditorLoad(editor)
{
        setTimeout(function()
        {
            editor.fire("FontSize", {value : "2"});
            editor.fire("FontName", {value : "Tahoma"});
           
        }, 300);
}
</script> 
 
<telerik:RadEditor id="htmlEditor" OnClientLoad="OnClientEditorLoad" runat="server">
    <Tools>
        <telerik:EditorToolGroup>
            <telerik:EditorTool Name="FontName" />
            <telerik:EditorTool Name="FontSize" />
        </telerik:EditorToolGroup>
    </Tools>
</telerik:RadEditor>

If your scenario is other, please provide more detailed information about it and the problem that you experience.

Best regards,
Rumen
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.
0
Rahul Khinvasara
Top achievements
Rank 1
answered on 05 May 2009, 10:11 AM
hi

actually  i am doing customization.  i will set the font size and font  family from one screen.  it will save in the database. when i display that text in editor i want to replace  font and family which is coming from the database. because when i save the data from rad editor it goes with the default font size and font  family or whatever we set.

Regards

Rahul
0
Rumen
Telerik team
answered on 08 May 2009, 06:01 AM
Hi Rahul,

Do you need our further assistance or you plan to implement this functionality yourself?

Best regards,
Rumen
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.
Tags
Editor
Asked by
Rahul Khinvasara
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Rahul Khinvasara
Top achievements
Rank 1
Share this question
or