This is a migrated thread and some comments may be shown as answers.
Change inherited style using js
3 Answers 33 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Brian Adle
Top achievements
Rank 1
Brian Adle asked on 22 Oct 2010, 09:51 PM
I'm looking for a way of changing the inherited font size and family using jquery/js instead of using a css file loaded when the page loads.

3 Answers, 1 is accepted

Sort by
0
Accepted
Alex Gyoshev
Telerik team
answered on 25 Oct 2010, 02:30 PM
Hello Brian,

You should be able to do that after the content area has loaded (perhaps when the editor load event fires or a bit later, using setTimeout)

    $($('#editor').data('tEditor').body).css('font', "20px 'Comic Sans MS'");

Hope this helps,
Alex Gyoshev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Brian Adle
Top achievements
Rank 1
answered on 25 Oct 2010, 03:44 PM
Fantastic! This works like a champ.  Is it possible for me to add new font sizes to the size drop down?  I need 6pt to be included as well.
0
mahmoud
Top achievements
Rank 1
answered on 22 Oct 2011, 04:15 PM
Thanks it solved my problem (which is mentioned in http://www.telerik.com/community/forums/aspnet-mvc/editor/how-to-set-default-font-for-the-editor.aspx )
Tags
Editor
Asked by
Brian Adle
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Brian Adle
Top achievements
Rank 1
mahmoud
Top achievements
Rank 1
Share this question
or