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

radeditor change font size, type, and color

3 Answers 125 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
diane
Top achievements
Rank 1
diane asked on 12 Oct 2018, 08:53 PM
In a vb.net 2010 web form application that I support, the application uses the Telerik Radeditor to edit letters sent to parents of students.
After the application runs, the html is stored in a SQL Server 2016 field called stringtemplate where the value is declared as varchar(max).
My question is I am trying to change the font size and color of the letters that are generated. When I look at the html that is stored in the stringtemplete field,
I do not see the html changes that I made.
Thus I am wondering if there is some part of the radeditor that I need to set so the font size and colors of parts of the letter can change. If so,
would you show me what I need to change?

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 15 Oct 2018, 08:15 AM
Hi Diane,

Please, see the following KB article on the matter No FONT tags are applied when I type text in the editor.
You may also find useful this article: Set default font for the content area and Font Name dropdown.

Best regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
diane
Top achievements
Rank 1
answered on 15 Oct 2018, 04:20 PM
I did find the links listed above very helpful! However I am guessing that if you change the font kind and size, that will be the default for everything set on the radeditor, correct? If not, how would I make the font size unique for each template (letter) that is accessed by the radeditor?
0
Rumen
Telerik team
answered on 16 Oct 2018, 12:38 PM
Hello,

The code below 

<script>
function OnClientLoad(editor) {
   setTimeout(function () {
       editor.fire('FontName', { value: 'Arial' });
       editor.fire('RealFontSize', { value: '12px' });
   }, 300);
}
</script>
<telerik:RadEditor OnClientLoad="OnClientLoad" ...

sets the default font to the content entered/inserted in the content area. It wraps the contents in a span tag with applied font-family and font-size CSS settings.

You have full control over it and you can change the font settings programmatically as you wish depending on the loaded template/content.

Best regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
General Discussions
Asked by
diane
Top achievements
Rank 1
Answers by
Rumen
Telerik team
diane
Top achievements
Rank 1
Share this question
or