Set Font Size and Font Family to Text

4 posts, 0 answers
  1. Rahul Khinvasara
    Rahul Khinvasara avatar
    303 posts
    Member since:
    Aug 2007

    Posted 17 Apr 2009 Link to this post

    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



  2. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 20 Apr 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Rahul Khinvasara
    Rahul Khinvasara avatar
    303 posts
    Member since:
    Aug 2007

    Posted 05 May 2009 Link to this post

    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
  5. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 08 May 2009 Link to this post

    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.
Back to Top